This is an automated email from the ASF dual-hosted git repository. btellier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit edf81389c08a066eff397f43de5ff80c38368778 Author: Tung Tran <vtt...@linagora.com> AuthorDate: Thu Aug 17 13:32:21 2023 +0700 Checkstyle - support avoid debug code --- .scalafix.conf | 8 +++++++- checkstyle.xml | 5 +++++ .../integration/WebAdminServerIntegrationImmutableTest.java | 2 +- .../james/webadmin/integration/WebAdminServerIntegrationTest.java | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.scalafix.conf b/.scalafix.conf index 392b670b6d..be03f4b941 100644 --- a/.scalafix.conf +++ b/.scalafix.conf @@ -30,4 +30,10 @@ DisableSyntax.noDefaultArgs = false DisableSyntax.noFinalVal = true DisableSyntax.noFinalize = true DisableSyntax.noValPatterns = false -DisableSyntax.noUniversalEquality = false \ No newline at end of file +DisableSyntax.noUniversalEquality = false +DisableSyntax.regex = [ + { + pattern = ".prettyPeek()" + message = "Found a debug code" + } +] \ No newline at end of file diff --git a/checkstyle.xml b/checkstyle.xml index 794862a826..2f80a5d7b0 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -30,6 +30,11 @@ <property name="severity" value="error"/> <property name="charset" value="UTF-8"/> <property name="fileExtensions" value="java, properties, xml"/> + <module name="RegexpSingleline"> + <property name="fileExtensions" value="java"/> + <property name="format" value=".prettyPeek()"/> + <property name="message" value="Found a debug code"/> + </module> <module name="TreeWalker"> <module name="IllegalImport"> <property name="regexp" value="true"/> diff --git a/server/protocols/webadmin-integration-test/webadmin-integration-test-common/src/main/java/org/apache/james/webadmin/integration/WebAdminServerIntegrationImmutableTest.java b/server/protocols/webadmin-integration-test/webadmin-integration-test-common/src/main/java/org/apache/james/webadmin/integration/WebAdminServerIntegrationImmutableTest.java index 3eb1b128d6..e4badb62cf 100644 --- a/server/protocols/webadmin-integration-test/webadmin-integration-test-common/src/main/java/org/apache/james/webadmin/integration/WebAdminServerIntegrationImmutableTest.java +++ b/server/protocols/webadmin-integration-test/webadmin-integration-test-common/src/main/java/org/apache/james/webadmin/integration/WebAdminServerIntegrationImmutableTest.java @@ -67,7 +67,7 @@ public abstract class WebAdminServerIntegrationImmutableTest { @Test void metricsRoutesShouldBeExposed() { String body = when() - .get("/metrics").prettyPeek() + .get("/metrics") .then() .statusCode(HttpStatus.OK_200) .extract() diff --git a/server/protocols/webadmin-integration-test/webadmin-integration-test-common/src/main/java/org/apache/james/webadmin/integration/WebAdminServerIntegrationTest.java b/server/protocols/webadmin-integration-test/webadmin-integration-test-common/src/main/java/org/apache/james/webadmin/integration/WebAdminServerIntegrationTest.java index 59cdfc07ae..f70425b6b1 100644 --- a/server/protocols/webadmin-integration-test/webadmin-integration-test-common/src/main/java/org/apache/james/webadmin/integration/WebAdminServerIntegrationTest.java +++ b/server/protocols/webadmin-integration-test/webadmin-integration-test-common/src/main/java/org/apache/james/webadmin/integration/WebAdminServerIntegrationTest.java @@ -112,7 +112,7 @@ public abstract class WebAdminServerIntegrationTest { @Test void metricsRoutesShouldBeExposed() { String body = when() - .get("/metrics").prettyPeek() + .get("/metrics") .then() .statusCode(HttpStatus.OK_200) .extract() --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org For additional commands, e-mail: notifications-h...@james.apache.org