Skip to content

Commit

Permalink
update checkstyle to support java 8 syntax
Browse files Browse the repository at this point in the history
With default version getting errors like:

```
[ant:checkstyle] /home/travis/build/Netflix/spectator/spectator-api/src/main/java/com/netflix/spectator/api/AbstractRegistry.java:105:11: unexpected token: aggr
[ant:checkstyle] /home/travis/build/Netflix/spectator/spectator-api/src/main/java/com/netflix/spectator/api/AbstractRegistry.java:108:5: Got an exception - expecting EOF, found 'if'
```

Updating to latest 6.8.1 fails with:

https://discuss.gradle.org/t/checkstyle-6-8-release-brake-compatibility-with-gradle-checkstyle-plugin/10375

So using 6.7. Note that RedundantThrows check was
removed:

http://stackoverflow.com/questions/27919444/java-checkstyle-redundant-throws
  • Loading branch information
brharrington committed Aug 5, 2015
1 parent 371ab53 commit b75af2f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ subprojects {
}

checkstyle {
toolVersion = '6.7'
ignoreFailures = false
configFile = rootProject.file('codequality/checkstyle.xml')
sourceSets = [sourceSets.main]
Expand Down
5 changes: 0 additions & 5 deletions codequality/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,6 @@
</module>-->
<module name="MissingSwitchDefault"/>
<!-- Problem with finding exception types... -->
<module name="RedundantThrows">
<property name="allowUnchecked" value="true"/>
<property name="suppressLoadErrors" value="true"/>
<property name="severity" value="info"/>
</module>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>

Expand Down

0 comments on commit b75af2f

Please sign in to comment.