JS-1736 Clarify /tests skill guidance for false-positive fixes#7013
JS-1736 Clarify /tests skill guidance for false-positive fixes#7013francois-mora-sonarsource wants to merge 3 commits into
Conversation
SummaryThis PR adds three substantial new sections to the
These sections align SonarJS guidance with companion documentation that had accumulated richer detail on FP handling and decorator patterns. The changes codify practices already in use on the team and help prevent common mistakes like losing coverage of now-valid code. What reviewers should knowWhat to look for: Pure documentation updates to an internal skill file — focus on clarity, accuracy of the patterns, and completeness of the guidance rather than code logic. Key points for reviewers:
Where to start: Read the three new sections in order (they appear consecutively at the end of the file) and verify each pattern matches SonarJS conventions you're familiar with. Pay special attention to the sentinel imports guidance — those constraints matter for test isolation.
|
Co-authored-by: sonar-review-alpha[bot] <266116024+sonar-review-alpha[bot]@users.noreply.github.com>
Co-authored-by: sonar-review-alpha[bot] <266116024+sonar-review-alpha[bot]@users.noreply.github.com>
|





Summary
This updates the
/testsskill for SonarJS to better reflect how false-positive fixes are represented in rule tests.invalidto failingvalidcasesoutputandsuggestionsshould be removed during that conversion while keeping setup fields likefilenameandoptionswhen neededinvalidtovalidinstead of deleting themWhy
The SonarJS skill and the mirrored Nigel guidance had drifted.
SonarJS already had the richer explanation for
errorsobjects used in quickfix assertions, while Nigel had accumulated useful guidance for FP reproducers and decorator sentinels.This change merges those pieces so the SonarJS-side skill is the more complete reference again.
Validation
git diff --check.claude/skills/tests/SKILL.md