File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -164,6 +164,14 @@ String wrongFlowsPhrase(Select sel, string kind) {
164164 )
165165}
166166
167+ /**
168+ * Gets a string element that contains double whitespace.
169+ */
170+ String doubleWhitespace ( Select sel ) {
171+ result = getSelectPart ( sel , _) and
172+ result .getValue ( ) .regexpMatch ( ".*\\s\\s.*" )
173+ }
174+
167175from AstNode node , string msg
168176where
169177 not node .getLocation ( ) .getFile ( ) .getAbsolutePath ( ) .matches ( "%/test/%" ) and
@@ -194,5 +202,8 @@ where
194202 or
195203 node = wrongFlowsPhrase ( _, "taint" ) and
196204 msg = "Use \"depends on\" instead of \"flows to\" in taint tracking queries."
205+ or
206+ node = doubleWhitespace ( _) and
207+ msg = "Avoid using double whitespace in alert messages."
197208 )
198209select node , msg
You can’t perform that action at this time.
0 commit comments