Skip to content

Commit

Permalink
updates checkstyle configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
grimmjo committed Apr 27, 2020
1 parent 47059dd commit 2a17c9a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 9 deletions.
15 changes: 15 additions & 0 deletions config/checkstyle/HEADER
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Copyright 2017-20\d\d original authors
*
* Licensed under the Apache License, Version 2.0 \(the "License"\);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
24 changes: 16 additions & 8 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
<property name="basedir" value="${basedir}"/>
-->

<module name="RegexpHeader">
<!-- Requires a licence copyright notice in each file. -->
<property name="headerFile"
value="${config_loc}/HEADER"/>
</module>

<property name="fileExtensions" value="java, properties, xml"/>

<!-- Checks that a package-info.java file exists for each package. -->
Expand All @@ -55,10 +61,6 @@
<!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
<module name="Translation"/>

<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<module name="FileLength"/>

<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<module name="FileTabCharacter"/>
Expand All @@ -77,13 +79,16 @@
<module name="SuppressWarningsFilter"/>

<!-- See http://checkstyle.sourceforge.net/config_filters.html#SuppressionFilter -->

<module name="SuppressionFilter">
<property name="file" value="${config_loc}/suppressions.xml"/>
<property name="optional" value="false"/>
</module>

<module name="TreeWalker">

<module name="SuppressionCommentFilter"/>

<!-- Needed for SuppressWarningsFilter -->
<module name="SuppressWarningsHolder"/>

Expand All @@ -93,7 +98,9 @@
<property name="excludeScope" value="private"/>
</module>
<module name="JavadocType"/>
<module name="JavadocStyle"/>
<module name="JavadocStyle">
<property name="checkFirstSentence" value="false"/>
</module>

<!-- Checks for Naming Conventions. -->
<!-- See http://checkstyle.sf.net/config_naming.html -->
Expand All @@ -118,7 +125,7 @@
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<!-- <module name="LineLength"/> -->
<module name="ParameterNumber">
<property name="max" value="12"/>
<property name="max" value="14"/>
</module>

<!-- Checks for whitespace -->
Expand All @@ -136,6 +143,7 @@
<module name="EmptyLineSeparator">
<property name="allowNoEmptyLineBetweenFields" value="true"/>
<property name="allowMultipleEmptyLines" value="false"/>
<property name="tokens" value="CTOR_DEF, VARIABLE_DEF, METHOD_DEF"/>
</module>
<module name="NoLineWrap"/>

Expand All @@ -161,8 +169,8 @@
<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>
<!--<module name="MagicNumber">-->
<!--<property name="ignoreFieldDeclaration" value="true"/>-->
<!--<property name="ignoreHashCodeMethod" value="true"/>-->
<!--<property name="ignoreFieldDeclaration" value="true"/>-->
<!--<property name="ignoreHashCodeMethod" value="true"/>-->
<!--</module>-->
<module name="MissingSwitchDefault"/>
<module name="SimplifyBooleanExpression"/>
Expand Down
8 changes: 7 additions & 1 deletion config/checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,11 @@

<suppressions>
<suppress checks="FileLength"
files="DefaultBeanContext.java|BeanDefinitionWriter.java|DefaultHttpClient.java"/>
files="DefaultBeanContext.java|BeanDefinitionWriter.java|DefaultHttpClient.java|BeanDefinitionInjectProcessor.java"/>
<suppress checks="DeclarationOrder"
files="UriTemplate.java"/>
<suppress checks="Header"
files="AnnotationClassReader.java|Attribute.java|Context.java|io[\\/]micronaut[\\/]core[\\/]util[\\/]clhm|AmazonInfo.java|DataCenterInfo.java|LeaseInfo.java|QueryStringDecoder.java|CronExpression.java|AntPathMatcher.java|io[\\/]micronaut[\\/]http[\\/]netty[\\/]stream[\\/]package-info.java" />
<suppress checks="[a-zA-Z0-9]*"
files="FlowControlHandler.java" />
</suppressions>

0 comments on commit 2a17c9a

Please sign in to comment.