Skip to content

Issue 17825: Use correct DTD reference for suppression.xml file#17826

Merged
romani merged 1 commit into
checkstyle:masterfrom
MetroMarv:issue-17825-fix-wrong-dtd
Sep 24, 2025
Merged

Issue 17825: Use correct DTD reference for suppression.xml file#17826
romani merged 1 commit into
checkstyle:masterfrom
MetroMarv:issue-17825-fix-wrong-dtd

Conversation

@MetroMarv

@MetroMarv MetroMarv commented Sep 24, 2025

Copy link
Copy Markdown
Contributor

https://checkstyle.sourceforge.io/filters/suppressionfilter.html#Description

When using the --generate-checks-and-files-suppression option we were referencing the wrong DTD file in the generated xml (instead of the DTD file for the "suppressions" file https://checkstyle.org/dtds/suppressions_1_2.dtd we referenced the one for the configuration file
https://checkstyle.org/dtds/configuration_1_3.dtd). This led to an invalid xml file, which couldn't be used for running checkstyle.

Now we use the correct DTD file everywhere.

Closes Issue: #17825

@romani

romani commented Sep 24, 2025

Copy link
Copy Markdown
Member

CI is not happy.

[ERROR] Failures: 
[ERROR]   CommitValidationTest.testCommitMessageHasProperStructure:218 Commit d309bd25ddf96920cc8123c49444e7ae7a5a6e83 message: "Issue 17825: Use correct DTD reference for suppression.xml file\n\nWhen using the `--generate-checks-and-files-suppression` option\nwe were referencing the wrong DTD file in the generated xml\n(instead of the DTD file for the "suppressions" file\nhttps://checkstyle.org/dtds/suppressions_1_2.dtd we referenced the\none for the configuration file\nhttps://checkstyle.org/dtds/configuration_1_3.dtd). This led to an\ninvalid xml file, which couldn't be used for running checkstyle.\n\nNow we use the correct DTD file everywhere.\n\nCloses #17825\n" is invalid
Proper commit message should adhere to the following rules:
    1) Must match one of the following patterns:
        ^Issue #\d+: .*$
        ^Pull #\d+: .*$
        ^(minor|config|infra|doc|spelling|dependency|supplemental): .*$
    2) It contains only one line of text
    3) Must not end with a period, space, or tab
    4) Commit message should be less than or equal to 200 characters

The rule broken was: 1

keep only fist line in commit message, all other text is for PR or issue desctiptions.

@MetroMarv MetroMarv force-pushed the issue-17825-fix-wrong-dtd branch from d309bd2 to 4b30957 Compare September 24, 2025 13:08
@MetroMarv MetroMarv force-pushed the issue-17825-fix-wrong-dtd branch from 4b30957 to 0b2608d Compare September 24, 2025 13:09
@MetroMarv

Copy link
Copy Markdown
Contributor Author

Apologies. Should be fixed now.

@romani romani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for detailed ticket and quick fix.

Will be released this weekend.

Do not hesitate to send more PRs

@romani romani merged commit b8c7451 into checkstyle:master Sep 24, 2025
120 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants