mirror of
https://github.com/github/codeql.git
synced 2025-12-21 11:16:30 +01:00
Apply suggestions from code review
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com>
This commit is contained in:
@@ -32,7 +32,7 @@ regular expression accordingly, such as by changing a <code>*</code> to a <code>
|
|||||||
</recommendation>
|
</recommendation>
|
||||||
<example>
|
<example>
|
||||||
<p>
|
<p>
|
||||||
In the following example, a regular expression is used to check the format of an string <code>id</code>.
|
In the following example, a regular expression is used to check the format of a string <code>id</code>.
|
||||||
However, the check always passes because the regular expression can match the empty substring.
|
However, the check always passes because the regular expression can match the empty substring.
|
||||||
For example, it will allow the ID string "<code>%%</code>" by matching an empty string at index 0.
|
For example, it will allow the ID string "<code>%%</code>" by matching an empty string at index 0.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* @name Regular expression always matches
|
* @name Regular expression always matches
|
||||||
* @description Regular expression tests checks always find a match indicate dead code or a logic error
|
* @description Regular expression tests that always find a match indicate dead code or a logic error
|
||||||
* @kind problem
|
* @kind problem
|
||||||
* @problem.severity warning
|
* @problem.severity warning
|
||||||
* @id js/regex/always-matches
|
* @id js/regex/always-matches
|
||||||
|
|||||||
Reference in New Issue
Block a user