Skip to content

Commit 659bfb9

Browse files
author
Vibe Bot
committed
Fix SonarQube issues in S125 implementation
Fix two external SonarQube issues (S1134, S1135) in the JSDoc comment for hasTaskMarker() in rule.ts. The comment listed "TODO, FIXME, HACK, XXX, NOTE" as examples, which caused SonarQube to flag the word "TODO" as an unresolved action item. The fix rewrites the comment to reference the TASK_MARKER_PATTERN constant instead of enumerating the keywords, removing the false positive without changing any runtime behavior.
1 parent 9605a6e commit 659bfb9

File tree

1 file changed

+2
-2
lines changed
  • packages/jsts/src/rules/S125

1 file changed

+2
-2
lines changed

packages/jsts/src/rules/S125/rule.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ export const rule: Rule.RuleModule = {
123123
};
124124

125125
/**
126-
* Returns true if the comment group contains at least one line that matches a task marker
127-
* (TODO, FIXME, HACK, XXX, NOTE) and that line is not itself parsable as code.
126+
* Returns true if the comment group contains at least one line that matches TASK_MARKER_PATTERN
127+
* and that line is not itself parsable as code.
128128
* This avoids false suppression when task-marker keywords appear as identifiers in commented code.
129129
*/
130130
function hasTaskMarker(groupValue: string, context: Rule.RuleContext): boolean {

0 commit comments

Comments
 (0)