mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
Changing the name (file & tags) to match the JS version.
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
<example>
|
||||
<p>In the following example, the initialization statement (<code>i = 0</code>) and the condition expression (<code>i < 100</code>) indicate that the intended iteration expression should have been incrementing, but instead a postfix decrement operator is used (<code>i--</code>).</p>
|
||||
<sample src="illDefinedForLoop.c" />
|
||||
<sample src="inconsistentLoopDirection.c" />
|
||||
|
||||
<p>To fix this issue, change the iteration expression to match the direction of the initialization statement and the condition expression: <code>i++</code>.</p>
|
||||
</example>
|
||||
@@ -1,11 +1,13 @@
|
||||
/**
|
||||
* @name Ill-defined for loop
|
||||
* @name Inconsistent direction of for loop
|
||||
* @description A for-loop iteration expression goes backward with respect of the initialization statement and condition expression.
|
||||
* @id cpp/ill-defined-for-loop
|
||||
* @kind problem
|
||||
* @problem.severity warning
|
||||
* @problem.severity error
|
||||
* @precision high
|
||||
* @tags external/microsoft/6293
|
||||
* @id cpp/inconsistent-loop-direction
|
||||
* @tags correctness
|
||||
* external/cwe/cwe-835
|
||||
* external/microsoft/6293
|
||||
* @msrc.severity important
|
||||
*/
|
||||
import cpp
|
||||
Reference in New Issue
Block a user