-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[java] More detailed message for the UselessParentheses rule #5982
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
base: main
Are you sure you want to change the base?
Conversation
a30f74f
to
41f22bb
Compare
Compared to main: (comment created at 2025-08-18 09:47:53+00:00 for 16ba857) |
...a/src/test/resources/net/sourceforge/pmd/lang/java/rule/codestyle/xml/UselessParentheses.xml
Outdated
Show resolved
Hide resolved
7a97dc3
to
fbaf3e6
Compare
fbaf3e6
to
cea62a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I think the new violation message containing the snippet is real improvement.
pmd-java/src/test/java/net/sourceforge/pmd/lang/java/ast/internal/PrettyPrintingUtilTest.java
Outdated
Show resolved
Hide resolved
pmd-java/src/test/java/net/sourceforge/pmd/lang/java/ast/internal/PrettyPrintingUtilTest.java
Show resolved
Hide resolved
@@ -2,7 +2,7 @@ | |||
<test-data | |||
xmlns="http://pmd.sourceforge.net/rule-tests" | |||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||
xsi:schemaLocation="http://pmd.sourceforge.net/rule-tests http://pmd.sourceforge.net/rule-tests_1_0_0.xsd"> | |||
xsi:schemaLocation="http://pmd.sourceforge.net/rule-tests http://pmd.sourceforge.net/rule-tests_1_1_0.xsd"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: you would need this new schema only to test for suppressed violations. And there is a version 1.1.1 upcoming (#5975)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adangel should I revert this line?
...a/src/test/resources/net/sourceforge/pmd/lang/java/rule/codestyle/xml/UselessParentheses.xml
Outdated
Show resolved
Hide resolved
...a/src/test/resources/net/sourceforge/pmd/lang/java/rule/codestyle/xml/UselessParentheses.xml
Outdated
Show resolved
Hide resolved
d42b74c
to
16ba857
Compare
Describe the PR
Add more details to the message for the UselessParentheses rule.
Related issues
#5960
Ready?
./mvnw clean verify
passes (checked automatically by github actions)