Skip to content

Commit 9830133

Browse files
committed
Python: Broaden noqa regex
1 parent d900c3d commit 9830133

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/ql/src/analysis/AlertSuppression.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class LgtmSuppressionComment extends LineSuppressionComment {
7272
* A noqa suppression comment. Both pylint and pyflakes respect this, so lgtm ought to too.
7373
*/
7474
class NoqaSuppressionComment extends LineSuppressionComment {
75-
NoqaSuppressionComment() { this.getContents().toLowerCase().regexpMatch("\\s*noqa\\s*") }
75+
NoqaSuppressionComment() { this.getContents().toLowerCase().regexpMatch("\\s*noqa([^:].*)?") }
7676

7777
override string getAnnotation() { result = "lgtm" }
7878
}

0 commit comments

Comments
 (0)