Skip to content

Commit dc35a1e

Browse files
committed
csgrep --warning-rate-limit: fix key events out of range
Related: https://issues.redhat.com/browse/OSH-67 Closes: #145
1 parent c753de1 commit dc35a1e

5 files changed

+2024
-0
lines changed

Diff for: src/lib/filter.cc

+1
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ bool RateLimitter::matchDef(const Defect &def)
249249
evt.msg.clear();
250250

251251
Defect defProto = def;
252+
defProto.keyEventIdx = 0U;
252253
defProto.events.clear();
253254
defProto.events.push_back(std::move(evt));
254255
d->errors.push(std::move(defProto));

Diff for: tests/csgrep/0116-csgrep-warning-rate-limit-args.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--mode=json --warning-rate-limit=1

0 commit comments

Comments
 (0)