From b75af2f17e1c276ac9bf8dabd72c0c133fa19598 Mon Sep 17 00:00:00 2001 From: Brian Harrington Date: Wed, 5 Aug 2015 15:16:53 -0700 Subject: [PATCH] update checkstyle to support java 8 syntax 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 --- build.gradle | 1 + codequality/checkstyle.xml | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index b67c0485c..22e810933 100755 --- a/build.gradle +++ b/build.gradle @@ -73,6 +73,7 @@ subprojects { } checkstyle { + toolVersion = '6.7' ignoreFailures = false configFile = rootProject.file('codequality/checkstyle.xml') sourceSets = [sourceSets.main] diff --git a/codequality/checkstyle.xml b/codequality/checkstyle.xml index 6b0ec7011..26fa10450 100644 --- a/codequality/checkstyle.xml +++ b/codequality/checkstyle.xml @@ -143,11 +143,6 @@ --> - - - - -