This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-checkstyle-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 10cb209 Format Groovy IT scripts
10cb209 is described below
commit 10cb2094f06371f2cc4c7559a92895871c12b9eb
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Wed Nov 25 20:27:33 2026 +0000
Format Groovy IT scripts
Formatting only: the CONVERSION-phase AST of every file is unchanged. See
https://github.com/apache/maven-invoker-plugin/issues/811.
---
src/it/MCHECKSTYLE-169/verify.groovy | 12 ++++++------
src/it/MCHECKSTYLE-222-no-resources/verify.groovy | 8 ++++----
src/it/MCHECKSTYLE-224/verify.groovy | 2 +-
src/it/MCHECKSTYLE-225/verify.groovy | 12 ++++++------
src/it/MCHECKSTYLE-260/verify.groovy | 6 +++---
src/it/MCHECKSTYLE-338/verify.groovy | 14 +++++++-------
.../MCHECKSTYLE-357-with-header-override/verify.groovy | 12 ++++++------
src/it/MCHECKSTYLE-54/setup.groovy | 6 +++---
src/it/MCHECKSTYLE-54/verify.groovy | 2 +-
src/it/MCHECKSTYLE-99/verify.groovy | 12 ++++++------
src/it/inlinerules/verify.groovy | 10 +++++-----
src/it/multi-modules-aggregate/verify.groovy | 16 ++++++++--------
12 files changed, 56 insertions(+), 56 deletions(-)
diff --git a/src/it/MCHECKSTYLE-169/verify.groovy
b/src/it/MCHECKSTYLE-169/verify.groovy
index 3e5c826..44870dc 100644
--- a/src/it/MCHECKSTYLE-169/verify.groovy
+++ b/src/it/MCHECKSTYLE-169/verify.groovy
@@ -18,10 +18,10 @@
* under the License.
*/
-assert new File(basedir, 'test/target/checkstyle-cachefile').exists();
-assert new File(basedir, 'test/target/checkstyle-checker.xml').exists();
-assert new File(basedir, 'test/target/checkstyle-suppressions.xml').exists();
-assert new File(basedir, 'test/target/checkstyle-header.txt').exists();
-assert new File(basedir, 'test/target/checkstyle-result.xml').exists();
+assert new File(basedir, 'test/target/checkstyle-cachefile').exists()
+assert new File(basedir, 'test/target/checkstyle-checker.xml').exists()
+assert new File(basedir, 'test/target/checkstyle-suppressions.xml').exists()
+assert new File(basedir, 'test/target/checkstyle-header.txt').exists()
+assert new File(basedir, 'test/target/checkstyle-result.xml').exists()
-return true;
+return true
diff --git a/src/it/MCHECKSTYLE-222-no-resources/verify.groovy
b/src/it/MCHECKSTYLE-222-no-resources/verify.groovy
index cd4c9cb..ff80c3c 100644
--- a/src/it/MCHECKSTYLE-222-no-resources/verify.groovy
+++ b/src/it/MCHECKSTYLE-222-no-resources/verify.groovy
@@ -17,11 +17,11 @@
* under the License.
*/
-def buildLog = new File( basedir, 'build.log' ).text
+def buildLog = new File(basedir, 'build.log').text
// the goal ran and skipped the report, as there are no sources and no
resources
-assert buildLog.contains( "Skipping
org.apache.maven.plugins:maven-checkstyle-plugin:" )
-assert buildLog.contains( ":checkstyle report goal" )
+assert buildLog.contains("Skipping
org.apache.maven.plugins:maven-checkstyle-plugin:")
+assert buildLog.contains(":checkstyle report goal")
// checkstyle:checkstyle writes its report to target/reports
-assert !new File( basedir, 'target/reports/checkstyle.html' ).exists()
+assert !new File(basedir, 'target/reports/checkstyle.html').exists()
diff --git a/src/it/MCHECKSTYLE-224/verify.groovy
b/src/it/MCHECKSTYLE-224/verify.groovy
index 81e979e..4aa7f69 100644
--- a/src/it/MCHECKSTYLE-224/verify.groovy
+++ b/src/it/MCHECKSTYLE-224/verify.groovy
@@ -17,7 +17,7 @@
* under the License.
*/
-File buildLog = new File( basedir, 'build.log' )
+File buildLog = new File(basedir, 'build.log')
assert buildLog.exists()
// This warning should not appear in the log
diff --git a/src/it/MCHECKSTYLE-225/verify.groovy
b/src/it/MCHECKSTYLE-225/verify.groovy
index 10399f9..a981f7b 100644
--- a/src/it/MCHECKSTYLE-225/verify.groovy
+++ b/src/it/MCHECKSTYLE-225/verify.groovy
@@ -18,14 +18,14 @@
* under the License.
*/
-def buildLog = new File( basedir, 'build.log' ).text
+def buildLog = new File(basedir, 'build.log').text
// core-license: the default header location LICENSE.txt is found in the
plugin dependency
-assert buildLog.contains( "The resource 'LICENSE.txt' was found" )
-assert new File( basedir, 'core-license/target/checkstyle-header.txt' ).text
== "MCHECKSTYLE-225 CUSTOM LICENSE"
+assert buildLog.contains("The resource 'LICENSE.txt' was found")
+assert new File(basedir, 'core-license/target/checkstyle-header.txt').text ==
"MCHECKSTYLE-225 CUSTOM LICENSE"
// core-custom-header and core-managed: a custom header location is found in
the plugin dependency,
// declared in the module or in the pluginManagement of its parent
-assert buildLog.contains( "The resource 'test/custom-header.txt' was found" )
-assert new File( basedir, 'core-custom-header/target/checkstyle-header.txt'
).text == "This is a custom header file."
-assert new File( basedir, 'core-managed/target/checkstyle-header.txt' ).text
== "This is a custom header file."
+assert buildLog.contains("The resource 'test/custom-header.txt' was found")
+assert new File(basedir,
'core-custom-header/target/checkstyle-header.txt').text == "This is a custom
header file."
+assert new File(basedir, 'core-managed/target/checkstyle-header.txt').text ==
"This is a custom header file."
diff --git a/src/it/MCHECKSTYLE-260/verify.groovy
b/src/it/MCHECKSTYLE-260/verify.groovy
index 37131e2..546f218 100644
--- a/src/it/MCHECKSTYLE-260/verify.groovy
+++ b/src/it/MCHECKSTYLE-260/verify.groovy
@@ -17,12 +17,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-def buildLog = new File( basedir, 'build.log' ).text
+def buildLog = new File(basedir, 'build.log').text
// 3 errors would be in child-a/src/generated/java and
child-b/src/generated/java
// but both locations shouldn't be checked
-assert !buildLog.contains( "[INFO] There are 3 errors reported by Checkstyle" )
+assert !buildLog.contains("[INFO] There are 3 errors reported by Checkstyle")
// the check ran in the parent (pom packaging, counted as one of the three)
and in both children: child-a with
// sourceDirectories, child-b with testSourceDirectories
-assert buildLog.count( "[INFO] You have 0 Checkstyle violations." ) == 3
+assert buildLog.count("[INFO] You have 0 Checkstyle violations.") == 3
diff --git a/src/it/MCHECKSTYLE-338/verify.groovy
b/src/it/MCHECKSTYLE-338/verify.groovy
index 6c606b9..f01e738 100644
--- a/src/it/MCHECKSTYLE-338/verify.groovy
+++ b/src/it/MCHECKSTYLE-338/verify.groovy
@@ -18,14 +18,14 @@
* under the License.
*/
-buildLog = new File( basedir, 'build.log' )
+buildLog = new File(basedir, 'build.log')
// verify that the "check" goal correctly raised a violation when the ignored
module is not omitted
-assert buildLog.text.contains( 'EmptyLogging: EmptyLoggingCheck on file
TestFalse.java' )
-assert !buildLog.text.contains( 'EmptyLogging: EmptyLoggingCheck on file
TestTrue.java' )
+assert buildLog.text.contains('EmptyLogging: EmptyLoggingCheck on file
TestFalse.java')
+assert !buildLog.text.contains('EmptyLogging: EmptyLoggingCheck on file
TestTrue.java')
// verify that the "checkstyle" goal does the same
-site = new File( basedir,
'omitignoredmodules-false/target/reports/checkstyle.html' )
-assert site.text.contains( 'EmptyLoggingCheck on file TestFalse.java' )
-site = new File( basedir,
'omitignoredmodules-true/target/reports/checkstyle.html' )
-assert !site.text.contains( 'EmptyLoggingCheck on file TestTrue.java' )
+site = new File(basedir,
'omitignoredmodules-false/target/reports/checkstyle.html')
+assert site.text.contains('EmptyLoggingCheck on file TestFalse.java')
+site = new File(basedir,
'omitignoredmodules-true/target/reports/checkstyle.html')
+assert !site.text.contains('EmptyLoggingCheck on file TestTrue.java')
diff --git a/src/it/MCHECKSTYLE-357-with-header-override/verify.groovy
b/src/it/MCHECKSTYLE-357-with-header-override/verify.groovy
index b7dc255..2062cb1 100644
--- a/src/it/MCHECKSTYLE-357-with-header-override/verify.groovy
+++ b/src/it/MCHECKSTYLE-357-with-header-override/verify.groovy
@@ -17,11 +17,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-assert new File(basedir, 'target/site/checkstyle.html').exists();
+assert new File(basedir, 'target/site/checkstyle.html').exists()
-assert new File(basedir, 'target/checkstyle-cachefile').exists();
-assert new File(basedir, 'target/checkstyle-checker.xml').exists();
-assert new File(basedir, 'target/checkstyle-result.xml').exists();
-assert new File(basedir, 'target/checkstyle-rules.xml').exists();
+assert new File(basedir, 'target/checkstyle-cachefile').exists()
+assert new File(basedir, 'target/checkstyle-checker.xml').exists()
+assert new File(basedir, 'target/checkstyle-result.xml').exists()
+assert new File(basedir, 'target/checkstyle-rules.xml').exists()
-return true;
+return true
diff --git a/src/it/MCHECKSTYLE-54/setup.groovy
b/src/it/MCHECKSTYLE-54/setup.groovy
index e51047b..8135b04 100644
--- a/src/it/MCHECKSTYLE-54/setup.groovy
+++ b/src/it/MCHECKSTYLE-54/setup.groovy
@@ -19,7 +19,7 @@
def srcDir = new File(basedir, 'src/main/java')
-srcDir.eachFileRecurse (groovy.io.FileType.FILES) {
- it.text = it.text.replaceAll( ~ /(\r\n|\r|\n)/, System.lineSeparator() )
+srcDir.eachFileRecurse(groovy.io.FileType.FILES) {
+ it.text = it.text.replaceAll(~ /(\r\n|\r|\n)/, System.lineSeparator())
}
-return true;
\ No newline at end of file
+return true
\ No newline at end of file
diff --git a/src/it/MCHECKSTYLE-54/verify.groovy
b/src/it/MCHECKSTYLE-54/verify.groovy
index 87e16a6..cc137b5 100644
--- a/src/it/MCHECKSTYLE-54/verify.groovy
+++ b/src/it/MCHECKSTYLE-54/verify.groovy
@@ -20,7 +20,7 @@
def eol = System.lineSeparator().bytes
def srcFile = new File(basedir,
'src/main/java/org/apache/maven/plugins/checkstyle/mcheckstyle54/Mcheckstyle54.java').text
-def matcher = srcFile =~ /(\r\n|\r|\n)/
+def matcher = srcFile =~ /(\r\n|\r|\n)/
assert matcher[0][0].bytes == eol : "EOL in file should have been ${eol} but
was ${matcher[0][0].bytes}"
// the check ran on the sources, with their system line separators, and found
nothing
diff --git a/src/it/MCHECKSTYLE-99/verify.groovy
b/src/it/MCHECKSTYLE-99/verify.groovy
index 4c042e0..0300442 100644
--- a/src/it/MCHECKSTYLE-99/verify.groovy
+++ b/src/it/MCHECKSTYLE-99/verify.groovy
@@ -19,13 +19,13 @@
*/
// default xrefTestLocation
-def defaultReport = new File( basedir,
'target/reports-default/checkstyle.html' )
+def defaultReport = new File(basedir, 'target/reports-default/checkstyle.html')
assert defaultReport.exists()
-assert defaultReport.text.contains( '<a
href="./xref/com/example/App.html#L26">' )
-assert defaultReport.text.contains( '<a
href="./xref-test/com/example/AppTest.html#L23">' )
+assert defaultReport.text.contains('<a
href="./xref/com/example/App.html#L26">')
+assert defaultReport.text.contains('<a
href="./xref-test/com/example/AppTest.html#L23">')
// custom xrefTestLocation
-def customReport = new File( basedir, 'target/reports-custom/checkstyle.html' )
+def customReport = new File(basedir, 'target/reports-custom/checkstyle.html')
assert customReport.exists()
-assert customReport.text.contains( '<a
href="./xref/com/example/App.html#L26">' )
-assert customReport.text.contains( '<a
href="./custom-xref-test-location/com/example/AppTest.html#L23">' )
+assert customReport.text.contains('<a href="./xref/com/example/App.html#L26">')
+assert customReport.text.contains('<a
href="./custom-xref-test-location/com/example/AppTest.html#L23">')
diff --git a/src/it/inlinerules/verify.groovy b/src/it/inlinerules/verify.groovy
index 41717c1..480792e 100644
--- a/src/it/inlinerules/verify.groovy
+++ b/src/it/inlinerules/verify.groovy
@@ -16,11 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-assert new File(basedir, 'target/checkstyle-checker.xml').exists();
-assert new File(basedir, 'target/checkstyle-header.txt').exists();
-assert new File(basedir, 'target/checkstyle-result.xml').exists();
+assert new File(basedir, 'target/checkstyle-checker.xml').exists()
+assert new File(basedir, 'target/checkstyle-header.txt').exists()
+assert new File(basedir, 'target/checkstyle-result.xml').exists()
-def buildLog = new File( basedir, 'build.log' )
+def buildLog = new File(basedir, 'build.log')
assert buildLog.text =~ /There are \d+ errors reported by Checkstyle/
-return true;
+return true
diff --git a/src/it/multi-modules-aggregate/verify.groovy
b/src/it/multi-modules-aggregate/verify.groovy
index 1e5b9b1..1ca01e2 100644
--- a/src/it/multi-modules-aggregate/verify.groovy
+++ b/src/it/multi-modules-aggregate/verify.groovy
@@ -18,15 +18,15 @@
* under the License.
*/
-assert new File( basedir, 'target/checkstyle-cachefile' ).exists();
-assert new File( basedir, 'target/checkstyle-checker.xml' ).exists();
-assert new File( basedir, 'target/checkstyle-result.xml' ).exists();
+assert new File(basedir, 'target/checkstyle-cachefile').exists()
+assert new File(basedir, 'target/checkstyle-checker.xml').exists()
+assert new File(basedir, 'target/checkstyle-result.xml').exists()
-assert new File( basedir, 'target/site/checkstyle-aggregate.html' ).exists();
+assert new File(basedir, 'target/site/checkstyle-aggregate.html').exists()
-content = new File( basedir, 'target/site/checkstyle-aggregate.html' ).text;
+content = new File(basedir, 'target/site/checkstyle-aggregate.html').text
-assert content.contains( 'org/apache/maven/plugins/checkstyle/its/App.java' );
-assert content.contains(
'org/apache/maven/plugins/checkstyle/its/AppTest.java' );
+assert content.contains('org/apache/maven/plugins/checkstyle/its/App.java')
+assert content.contains('org/apache/maven/plugins/checkstyle/its/AppTest.java')
-return true;
+return true