From a2f1ad5503a7987a94cdc18a9bc2af2ef8d52af7 Mon Sep 17 00:00:00 2001 From: thomasperkins1123 Date: Wed, 14 Feb 2024 01:56:03 +0000 Subject: [PATCH] Make maven and gradle share checkstyle configuration --- build.gradle | 8 +++++++- config/nohttp/suppressions.xml | 11 ----------- pom.xml | 4 +++- src/checkstyle/nohttp-checkstyle.xml | 3 +++ 4 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 config/nohttp/suppressions.xml diff --git a/build.gradle b/build.gradle index ede413a4427..2a4ebf14e6c 100644 --- a/build.gradle +++ b/build.gradle @@ -54,7 +54,13 @@ tasks.named('test') { } checkstyle { - configFile file("${project.rootDir}/src/checkstyle/nohttp-checkstyle.xml") + configDirectory = project.file('src/checkstyle') + configFile = file('src/checkstyle/nohttp-checkstyle.xml') +} + +checkstyleNohttp { + configDirectory = project.file('src/checkstyle') + configFile = file('src/checkstyle/nohttp-checkstyle.xml') } tasks.named("formatMain").configure { dependsOn("checkstyleMain") } diff --git a/config/nohttp/suppressions.xml b/config/nohttp/suppressions.xml deleted file mode 100644 index f00599bb229..00000000000 --- a/config/nohttp/suppressions.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - diff --git a/pom.xml b/pom.xml index 8a3d6f15123..cf47f8aa6df 100644 --- a/pom.xml +++ b/pom.xml @@ -198,10 +198,12 @@ validate src/checkstyle/nohttp-checkstyle.xml - src/checkstyle/nohttp-checkstyle-suppressions.xml ${basedir} **/* **/.git/**/*,**/.idea/**/*,**/target/**/,**/.flattened-pom.xml,**/*.class + + config_loc=${basedir}/src/checkstyle/ + check diff --git a/src/checkstyle/nohttp-checkstyle.xml b/src/checkstyle/nohttp-checkstyle.xml index e6205127bfc..f886411e62d 100644 --- a/src/checkstyle/nohttp-checkstyle.xml +++ b/src/checkstyle/nohttp-checkstyle.xml @@ -4,4 +4,7 @@ "https://checkstyle.org/dtds/configuration_1_2.dtd"> + + +