-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suppressions DTD not found #10788
Comments
Please provide the XML file and everything else needed to reproduce the issue. https://checkstyle.org/report_issue.html#How_to_report_a_bug.3F Most likely, you may be using an out of date DTD. |
I found the culprit. I'm using XML entities in the <!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.2//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_2.dtd" [
<!ENTITY csiMain "src.main.java.checkstyle.issue">
]>
I attach a small Gradle project that demonstrate this behavior: checkstyle-issue-10788.tar.gz |
@ddidier does it mean that issue can be closed? |
I would say no since this behavior seems unexpected. Why does it work in one case and not in the other? |
What 2 cases are you referring to? If your suppression file has entities, then it makes sense that it passes without the filter and fails with the filter when you do not provide Checkstyle disallows the features by default in XMLs without that extra parameter:
I assume your file may be falling under the parameter entities. |
We do not support Gradle plugin, to keep issue valid you need to repoduce problem by cli, see link above a how to report issue. |
That makes sense. I wasn't aware of the second and third limitations. I looked quickly in the documentation but couldn't find these items, and specifically not in https://checkstyle.sourceforge.io/config_system_properties.html#Enable_External_DTD_load. Do you want me to open a new issue for this? You can close this one. Thanks |
Better to open new issue |
Hi,
I'm using CheckStyle with Gradle and I'm using
SuppressionsFilter
.SuppressionsFilter
and./gradlew build
=> passSuppressionsFilter
and./gradlew build -Dcheckstyle.enableExternalDtdLoad=true
=> passSuppressionsFilter
and./gradlew build
=> failSuppressionsFilter
and./gradlew build -Dcheckstyle.enableExternalDtdLoad=true
=> passSo this error is related to #6474.
The Gradle plugin seems to use the Ant task (see logs below) and it looks like the Ant task is not getting the DTD from the CheckStyle JAR but from the internet only. So this may be a CheckStyle issue rather than a Gradle one.
The text was updated successfully, but these errors were encountered: