Skip to content

Commit c3bb804

Browse files
committed
add sample
1 parent 4dbd1db commit c3bb804

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

.github/workflows/CI-unixish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
void foo(int x) {
3+
if (x >= 0 || x <= 10) {}
4+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
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+
^

0 commit comments

Comments
 (0)