Changing the name (file & tags) to match the JS version.

This commit is contained in:
Raul Garcia
2018-10-19 15:21:56 -07:00
parent e2fcaa9e20
commit 2f4da8841f
9 changed files with 31 additions and 29 deletions

View File

@@ -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>

View File

@@ -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