Skip to content

Commit

Permalink
csgrep --warning-rate-limit: fix key events out of range
Browse files Browse the repository at this point in the history
  • Loading branch information
kdudka committed Oct 10, 2023
1 parent c753de1 commit dc35a1e
Show file tree
Hide file tree
Showing 5 changed files with 2,024 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ bool RateLimitter::matchDef(const Defect &def)
evt.msg.clear();

Defect defProto = def;
defProto.keyEventIdx = 0U;
defProto.events.clear();
defProto.events.push_back(std::move(evt));
d->errors.push(std::move(defProto));
Expand Down
1 change: 1 addition & 0 deletions tests/csgrep/0116-csgrep-warning-rate-limit-args.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--mode=json --warning-rate-limit=1
Loading

0 comments on commit dc35a1e

Please sign in to comment.