Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e53382c commit b87befcCopy full SHA for b87befc
1 file changed
ql/ql/src/queries/style/AlertMessage.ql
@@ -164,6 +164,14 @@ String wrongFlowsPhrase(Select sel, string kind) {
164
)
165
}
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
+
175
from AstNode node, string msg
176
where
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
0 commit comments