Skip to content

Commit 50e6d62

Browse files
msg-filters: added filter for too-many event in csdiff
Resolves: issues.redhat.com/browse/OSH-496 Added filter and test for error[too-many] findings in csdiff in order to apply the filter deterministically even if the location and the number of occurrences vary
1 parent be42568 commit 50e6d62

8 files changed

+11
-0
lines changed

src/lib/msg-filter.cc

+2
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ MsgFilter::MsgFilter():
7878
d(new Private)
7979
{
8080
d->addMsgFilter("", "[0-9][0-9]* out of [0-9][0-9]* times");
81+
// ignore error[too-many] events
82+
d->addMsgFilter("", "[0-9]+ occurrences of warning\\[.*\\] exceeded the specified limit [0-9]+");
8183
d->addMsgFilter("UNUSED_VALUE",
8284
"\\(instance [0-9]+\\)");
8385
d->addMsgFilter("STRING_OVERFLOW",

tests/csdiff/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,6 @@ test_csdiff(diff-misc 22-kernel-zstream-path)
9090
test_csdiff(diff-misc 23-cov-parser-key-event)
9191
test_csdiff(diff-misc 24-shellcheck-line-content)
9292
test_csdiff(diff-misc 25-llvm-17-path-filter)
93+
test_csdiff(diff-misc 26-too-many-events-filter)
9394

9495
add_subdirectory(filter-file)

tests/csdiff/diff-misc/26-too-many-events-filter-add-z.err

Whitespace-only changes.

tests/csdiff/diff-misc/26-too-many-events-filter-add.err

Whitespace-only changes.

tests/csdiff/diff-misc/26-too-many-events-filter-fix-z.err

Whitespace-only changes.

tests/csdiff/diff-misc/26-too-many-events-filter-fix.err

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Error: SNYK_CODE_WARNING (CWE-190):
2+
<unknown>: error[too-many]: 15234 occurrences of warning[cpp/IntegerOverflow] exceeded the specified limit 1030123
3+
sqlite-src-3260000/tsrc/fts456.c:1304:5: note: 573 occurrences of warning[cpp/IntegerOverflow] were discarded because of this
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Error: SNYK_CODE_WARNING (CWE-190):
2+
<unknown>: error[too-many]: 1573 occurrences of warning[cpp/IntegerOverflow] exceeded the specified limit 1024
3+
sqlite-src-3260000/tsrc/fts3.c:1304:5: note: 573 occurrences of warning[cpp/IntegerOverflow] were discarded because of this
4+
5+

0 commit comments

Comments
 (0)