fix most ql-for-ql warnings in JS

This commit is contained in:
Erik Krogh Kristensen
2022-02-11 17:57:37 +01:00
parent 360cf0ff17
commit a1c5724be7
29 changed files with 117 additions and 167 deletions

View File

@@ -33,12 +33,7 @@ private string getALineOfCommentedOutCode(Comment c) {
* disregarded when looking for commented-out code.
*/
private predicate containsCodeExample(Comment c) {
exists(string text | text = c.getText() |
text.matches("%<pre>%</pre>%") or
text.matches("%<code>%</code>%") or
text.matches("%@example%") or
text.matches("%```%")
)
c.getText().matches(["%<pre>%</pre>%", "%<code>%</code>%", "%@example%", "%```%"])
}
/**