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) {
164
164
)
165
165
}
166
166
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
+
167
175
from AstNode node , string msg
168
176
where
169
177
not node .getLocation ( ) .getFile ( ) .getAbsolutePath ( ) .matches ( "%/test/%" ) and
@@ -194,5 +202,8 @@ where
194
202
or
195
203
node = wrongFlowsPhrase ( _, "taint" ) and
196
204
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."
197
208
)
198
209
select node , msg
You can’t perform that action at this time.
0 commit comments