GeezerVison is showing github.com — [core] Text renderer should include name of violated rule · Issue #1961 · pmd/pmd
[core] Text renderer should include name of violated rule #1961DescriptionAffects PMD Version:
6.16.0, 6.17.0
Description:
Error messages generated in text output do not reference the name of the rule violated. Without it, it's hard to find documentation on how to resolve the error. The rule name is needed for the SuppressWarnings annotation.
Running PMD through: [CLI | Ant] Activitychanged the title [-][Java] Errror messages must include name of rule violated. [/-] [+][core] Text renderer doesn't include name of violated rule[/+] on Aug 18, 2019linusjf commented on Nov 24, 2019 The SuppressWarnings annotation requires the full name of the rule like PMD.RuleName or RuleName.
Are there any plans to simply allow regex-like prefix and let PMD's implementation decide which rule is referenced?
Ambiguities are to be flagged, of course, and rejected. linusjf commented on May 21, 2020 This would be a good issue to be fixed as well.
If this change request is not to be implemented, is it a better idea to have the documentation provide the text of the violation messages? Either way, the purpose will be served. The rules can then be searched for and located more easily. GuntherSchrijvers commented on Nov 12, 2020 Hello @Fernal73 ,
How would the output need to look like?
Would this be ok?
SourceCodeFileName:LineNumber:<TAB>RuleName:<TAB>RuleDescription linusjf commented on Nov 12, 2020
Hello @Fernal73 ,
How would the output need to look like?
Would this be ok?
SourceCodeFileName:LineNumber:<TAB>RuleName:<TAB>RuleDescription
SourceCodeFileName:LineNumber:<TAB>RuleDescription:<TAB>RuleName
to maintain compatibility in case this output is parsed by any programs. The RuleDescription would be the same as currently output.
GuntherSchrijvers commented on Nov 12, 2020 Ok, thank you for the feedback, linusjf commented on Nov 12, 2020
Ok, thank you for the feedback,
It would have helped if you had informed me that you were concerned about field alignment. That's a legitimate reason to retain your original format. I don't see any backward compatibility use, either. GuntherSchrijvers commented on Nov 12, 2020 Hello @Fernal73,
I hadn't considered the field alignment, It is only thanks to the feedback of @oowekyala on the pull request that this was taken into consideration. linusjf commented on Nov 12, 2020 changed the title [-][core] Text renderer doesn't include name of violated rule[/-] [+][core] Text renderer should include name of violated rule[/+] on Nov 23, 2020added a commit that references this issue on Dec 15, 2020This issue will close once commit 62c9b8f is merged into the 'master' branch.62c9b8f
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|