forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
602ee5d
commit 25539c8
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* @name Liquid syntax comment | ||
* @description A comment that contains Liquid syntax ```{{ }}``` may indicate code that is incomplete or | ||
* broken, or it may highlight an ambiguity in the software's specification. | ||
* @kind problem | ||
* @problem.severity recommendation | ||
* @id js/liquid-comment | ||
* @tags maintainability | ||
* external/cwe/cwe-546 | ||
* @precision medium | ||
*/ | ||
|
||
|
||
import javascript | ||
import semmle.javascript.YAML | ||
|
||
from HTML::CommentNode c | ||
where c.getText().regexpMatch("(?s).*FIXME.*|.*FUTURE\\{\\{\\D*\\}\\}BUG.*|.*(?<!=)\\s*XXX.*") | ||
select c, "HTML code comments should be addressed." |