Tracking in-line suppression comments
How to track the use of in-line suppression comments in the code.
Last updated
Was this helpful?
How to track the use of in-line suppression comments in the code.
Issue suppression on a specific line is possible in most languages by using the //NOSONAR comment or a comparable in-line suppression mechanism suited to the language.
To track the use of in-line suppression comments:
For C, C++, Objective-C, PHP, T-SQL:
Use the rule NoSonar to track the use of the NOSONAR comment.
For COBOL, PL/SQL:
Use the rule NoSonarCheck to track the use of the NOSONAR comment.
For JavaScript, TypeScript:
Use the rule S1291 to track the use of the NOSONAR comment.
For Java:
Use the rule S1309 to track the use of the @SuppressWarnings annotation.
For Python:
Use the rule S1291 to track the use of the NOSONAR comment.
Use the rule S1309 to track the use of the noqa comment.
Use the rule S7632 to detect malformed NOSONAR and noqa comments.
For more information about the in-line suppression of issues for a given language, refer to the corresponding section in Languages .
Last updated
Was this helpful?
Was this helpful?

