File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
samples/incorrectLogicOperator Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -551,7 +551,7 @@ jobs:
551551 fi
552552
553553 # test sarif output
554- ./cppcheck --enable=style --error-exitcode=0 --platform=unix64 --inconclusive samples/unreadVariable --output-file=samples.sarif --output-format=sarif
554+ ./cppcheck --enable=style --error-exitcode=0 --platform=unix64 --inconclusive samples/incorrectLogicOperator/bad.c --output-file=samples.sarif --output-format=sarif
555555 cat samples.sarif
556556
557557 # self check simplecpp
Original file line number Diff line number Diff line change 1+
2+ void foo (int x ) {
3+ if (x >= 0 || x <= 10 ) {}
4+ }
Original file line number Diff line number Diff line change 1+ samples/incorrectLogicOperator/bad.c:3:16: warning: Logical disjunction always evaluates to true: x >= 0 || x <= 10. [incorrectLogicOperator]
2+ if (x >= 0 || x <= 10) {}
3+ ^
You can’t perform that action at this time.
0 commit comments