From 710964b47df92cbdb1ab41b562c80dd9d7c28ce8 Mon Sep 17 00:00:00 2001 From: Stypox Date: Fri, 18 Mar 2022 19:58:59 +0100 Subject: [PATCH] Update checkstyle to 10.0 and fix various related issues - Put checkstyle files into checkstyle/ subfolder so that the gradle task does not implicitly depend on the whole project, fixing many warnings during build and possibly increasing build performance. - Remove unused SuppressionXpathFilter from config file. - Remove outdated suppressions from suppressions file. --- app/build.gradle | 4 ++-- checkstyle.xml => checkstyle/checkstyle.xml | 9 +-------- .../suppressions.xml | 8 -------- 3 files changed, 3 insertions(+), 18 deletions(-) rename checkstyle.xml => checkstyle/checkstyle.xml (94%) rename checkstyle-suppressions.xml => checkstyle/suppressions.xml (74%) diff --git a/app/build.gradle b/app/build.gradle index 51762db75..0299c0fd5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -98,7 +98,7 @@ android { } ext { - checkstyleVersion = '9.3' + checkstyleVersion = '10.0' androidxLifecycleVersion = '2.3.1' androidxRoomVersion = '2.4.2' @@ -121,7 +121,7 @@ configurations { } checkstyle { - getConfigDirectory().set(rootProject.file(".")) + getConfigDirectory().set(rootProject.file("checkstyle")) ignoreFailures false showViolations true toolVersion = checkstyleVersion diff --git a/checkstyle.xml b/checkstyle/checkstyle.xml similarity index 94% rename from checkstyle.xml rename to checkstyle/checkstyle.xml index 61145d61f..282358f6a 100644 --- a/checkstyle.xml +++ b/checkstyle/checkstyle.xml @@ -22,7 +22,7 @@ - + @@ -180,12 +180,5 @@ - - - - - - diff --git a/checkstyle-suppressions.xml b/checkstyle/suppressions.xml similarity index 74% rename from checkstyle-suppressions.xml rename to checkstyle/suppressions.xml index 3c5e4891a..8b9e50afa 100644 --- a/checkstyle-suppressions.xml +++ b/checkstyle/suppressions.xml @@ -7,18 +7,10 @@ files="LocalItemListAdapter.java" lines="232,304"/> - - - -