[doc] Improve documentation for Suppression
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 5.5k
- Forks
- 1.6k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 54
Description
Part of #1139
- Some formulations in the first section are confusing
- State clearly which languages support
// NOPMDsuppressions - Provide a better index for suppression alternatives by language?
I guess people say "how do I suppress this in Java" rather than
"let's see if I can suppress this with an annotation…" - At least cross-link with CPD Suppressions section, as people may look for it here.
Original request:
Affects PMD Version:
6.0.1
Rule:
Documenation. No specific rule.
Description:
The use of Violation Suppress Regex and Violation Suppress XPath needs better examples.
For the regex, it's not clear which message has to be matched (html?, xml?, what delimits "a" message?).
For XPath, a tutorial of how to use the "designer" would be great, plus a few real live examples that show how to find the right XPath expression for a specific rule.
And an explanation where in the AST the rule will match, so that one knows where a construct like ".[typeof(...)]" matches.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the current Suppression documentation and the linked CPD Suppressions section first. Clarify the wording, document which languages support // NOPMD, organize suppression alternatives by language, and add understandable regex and XPath examples, including guidance for the designer. Done means the documentation addresses the listed confusion and provides the requested cross-link and examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100