Skip to content

MetadataGeneratorUtilTest is modifying files in the main folder for Windows hosts #8884

@rnveach

Description

@rnveach

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>&lt;p&gt;
- 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[])}.
- &lt;/p&gt;
- &lt;p&gt;
- By default the Check enforces Java style.
- &lt;/p&gt;
- &lt;p&gt;
- 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>&lt;p&gt;&#xD;
+ Checks the style of array type definitions.&#xD;
+ Some like Java style: {@code public static void main(String[] args)}&#xD;
+ and some like C style: {@code public static void main(String args[])}.&#xD;
+ &lt;/p&gt;&#xD;
+ &lt;p&gt;&#xD;
+ By default the Check enforces Java style.&#xD;
+ &lt;/p&gt;&#xD;
+ &lt;p&gt;&#xD;
+ This check strictly enforces only Java style for method return types regardless&#xD;
+ of the value for 'javaStyle'. For example, {@code byte[] getData()}.&#xD;
+ This is because C doesn't compile methods with array declarations on the name.&#xD;
  &lt;/p&gt;</description>
          <properties>
             <property default-value="true" name="javaStyle" type="boolean">

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions