Skip to content

Commit

Permalink
Create ForLiquidComment.ql
Browse files Browse the repository at this point in the history
  • Loading branch information
SAUMILDHANKAR authored May 18, 2023
1 parent 602ee5d commit 25539c8
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions javascript/ql/src/Comments/ForLiquidComment.ql
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."

0 comments on commit 25539c8

Please sign in to comment.