mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
Python: Allow whitespace before colon
As suggested by @DimitriPapadopolous. Also fixes the test output to account for the `noqa` annotation (with added comment) that we're now detecting.
This commit is contained in:
committed by
Rasmus Lerchedahl Petersen
parent
98301332bd
commit
9bf2eb55ca
@@ -72,7 +72,7 @@ class LgtmSuppressionComment extends LineSuppressionComment {
|
||||
* A noqa suppression comment. Both pylint and pyflakes respect this, so lgtm ought to too.
|
||||
*/
|
||||
class NoqaSuppressionComment extends LineSuppressionComment {
|
||||
NoqaSuppressionComment() { this.getContents().toLowerCase().regexpMatch("\\s*noqa([^:].*)?") }
|
||||
NoqaSuppressionComment() { this.getContents().toLowerCase().regexpMatch("\\s*noqa\\s*([^:].*)?") }
|
||||
|
||||
override string getAnnotation() { result = "lgtm" }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user