Identified when backporting 8.36.1 . Confirmed this still happens in master.
Running MetadataGeneratorUtilTest is modifying 63 files in src/main/resources/com/puppycrawl/tools/checkstyle/meta/. This happens when running by itself or as part of the suite.
No test should ever modify our files controlled by git. Especially production code/resources. This is an accident waiting to be staged and committed.
Here is the patch of one of the modifications.
diff --git a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/ArrayTypeStyleCheck.xml b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/ArrayTypeStyleCheck.xml
index 82e64e5..4efd0de 100644
--- a/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/ArrayTypeStyleCheck.xml
+++ b/src/main/resources/com/puppycrawl/tools/checkstyle/meta/checks/ArrayTypeStyleCheck.xml
@@ -4,18 +4,18 @@
<check fully-qualified-name="com.puppycrawl.tools.checkstyle.checks.ArrayTypeStyleCheck"
name="ArrayTypeStyle"
parent="com.puppycrawl.tools.checkstyle.TreeWalker">
- <description><p>
- Checks the style of array type definitions.
- Some like Java style: {@code public static void main(String[] args)}
- and some like C style: {@code public static void main(String args[])}.
- </p>
- <p>
- By default the Check enforces Java style.
- </p>
- <p>
- This check strictly enforces only Java style for method return types regardless
- of the value for 'javaStyle'. For example, {@code byte[] getData()}.
- This is because C doesn't compile methods with array declarations on the name.
+ <description><p>
+ Checks the style of array type definitions.
+ Some like Java style: {@code public static void main(String[] args)}
+ and some like C style: {@code public static void main(String args[])}.
+ </p>
+ <p>
+ By default the Check enforces Java style.
+ </p>
+ <p>
+ This check strictly enforces only Java style for method return types regardless
+ of the value for 'javaStyle'. For example, {@code byte[] getData()}.
+ This is because C doesn't compile methods with array declarations on the name.
</p></description>
<properties>
<property default-value="true" name="javaStyle" type="boolean">
Identified when backporting 8.36.1 . Confirmed this still happens in master.
Running
MetadataGeneratorUtilTestis modifying 63 files insrc/main/resources/com/puppycrawl/tools/checkstyle/meta/. This happens when running by itself or as part of the suite.No test should ever modify our files controlled by git. Especially production code/resources. This is an accident waiting to be staged and committed.
Here is the patch of one of the modifications.