cnescatlab/i-CodeCNES

False positive on COM.DATA.Invariant rule

Opened this issue · 1 comments

Expected behavior

  • A declaration for a constant integer variable (NBW) should not raise a COM.DATA.Invariant violation.
  • A declaration of a variable (DATE) inside a loop shoud not raise a COM.DATA.Invariant

Actual behavior

The following scripts
image
image

raise the following results in i-Code
image
image

Steps to reproduce behavior

Detection version

3.0

Thises falses positives are still present in the version 4.0 of i-code.

I add the repeated case of the variable "user"

comdatainvariant
comdatainvariant1

.