Upgrade Android checkstyle to 9.0.1
Adapt checkstyle.xml to match the latest version, and remove a line break between imports which trigger a checkstyle volation.
This commit is contained in:
parent
8bf28e9f53
commit
0c9666b733
3 changed files with 9 additions and 29 deletions
|
@ -2,7 +2,7 @@ apply plugin: 'checkstyle'
|
||||||
check.dependsOn 'checkstyle'
|
check.dependsOn 'checkstyle'
|
||||||
|
|
||||||
checkstyle {
|
checkstyle {
|
||||||
toolVersion = '6.19'
|
toolVersion = '9.0.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
task checkstyle(type: Checkstyle) {
|
task checkstyle(type: Checkstyle) {
|
||||||
|
|
|
@ -37,6 +37,14 @@ page at http://checkstyle.sourceforge.net/config.html -->
|
||||||
|
|
||||||
<module name="SuppressWarningsFilter"/>
|
<module name="SuppressWarningsFilter"/>
|
||||||
|
|
||||||
|
<module name="LineLength">
|
||||||
|
<!-- what is a good max value? -->
|
||||||
|
<property name="max" value="150" />
|
||||||
|
<!-- ignore lines like "$File: //depot/... $" -->
|
||||||
|
<property name="ignorePattern" value="\$File.*\$" />
|
||||||
|
<property name="severity" value="info" />
|
||||||
|
</module>
|
||||||
|
|
||||||
<module name="TreeWalker">
|
<module name="TreeWalker">
|
||||||
|
|
||||||
<!-- Checks for Naming Conventions. -->
|
<!-- Checks for Naming Conventions. -->
|
||||||
|
@ -72,13 +80,6 @@ page at http://checkstyle.sourceforge.net/config.html -->
|
||||||
|
|
||||||
<!-- Checks for Size Violations. -->
|
<!-- Checks for Size Violations. -->
|
||||||
<!-- See http://checkstyle.sf.net/config_sizes.html -->
|
<!-- See http://checkstyle.sf.net/config_sizes.html -->
|
||||||
<module name="LineLength">
|
|
||||||
<!-- what is a good max value? -->
|
|
||||||
<property name="max" value="150" />
|
|
||||||
<!-- ignore lines like "$File: //depot/... $" -->
|
|
||||||
<property name="ignorePattern" value="\$File.*\$" />
|
|
||||||
<property name="severity" value="info" />
|
|
||||||
</module>
|
|
||||||
<module name="MethodLength" />
|
<module name="MethodLength" />
|
||||||
<module name="ParameterNumber">
|
<module name="ParameterNumber">
|
||||||
<property name="ignoreOverriddenMethods" value="true"/>
|
<property name="ignoreOverriddenMethods" value="true"/>
|
||||||
|
@ -152,26 +153,6 @@ page at http://checkstyle.sourceforge.net/config.html -->
|
||||||
</module>
|
</module>
|
||||||
<module name="UpperEll" />
|
<module name="UpperEll" />
|
||||||
|
|
||||||
<module name="FileContentsHolder" />
|
|
||||||
<!-- Required by comment suppression filters -->
|
|
||||||
|
|
||||||
</module>
|
|
||||||
|
|
||||||
<module name="SuppressionFilter">
|
|
||||||
<!--<property name="file" value="team-props/checkstyle/checkstyle-suppressions.xml" />-->
|
|
||||||
</module>
|
|
||||||
|
|
||||||
<!-- Enable suppression comments -->
|
|
||||||
<module name="SuppressionCommentFilter">
|
|
||||||
<property name="offCommentFormat" value="CHECKSTYLE IGNORE\s+(\S+)" />
|
|
||||||
<property name="onCommentFormat" value="CHECKSTYLE END IGNORE\s+(\S+)" />
|
|
||||||
<property name="checkFormat" value="$1" />
|
|
||||||
</module>
|
|
||||||
<module name="SuppressWithNearbyCommentFilter">
|
|
||||||
<!-- Syntax is "SUPPRESS CHECKSTYLE name" -->
|
|
||||||
<property name="commentFormat" value="SUPPRESS CHECKSTYLE (\w+)" />
|
|
||||||
<property name="checkFormat" value="$1" />
|
|
||||||
<property name="influenceFormat" value="1" />
|
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
</module>
|
</module>
|
||||||
|
|
|
@ -2,7 +2,6 @@ package com.genymobile.scrcpy;
|
||||||
|
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue