Skip to content

Commit

Permalink
common: take important flag from scanners into account
Browse files Browse the repository at this point in the history
  • Loading branch information
kdudka committed Sep 29, 2023
1 parent 0ee6c67 commit a0542ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion make-srpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Tool for plugging static analyzers into the build process, free of mock.
%package -n csmock-common
Summary: Core of csmock (a mock wrapper for Static Analysis tools)
Requires: csdiff > 3.0.3
Requires: csdiff > 3.0.4
Requires: csgcca
Requires: cswrap
Requires: mock
Expand Down
3 changes: 3 additions & 0 deletions py/common/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@ def finalize_results(js_file, results, props):
cmd += " | csdiff <(csgrep '%s' --mode=json --drop-scan-props --invert-regex --checker '%s' %s) -" \
% (js_file, chk_re, csgrep_args)

# finally take all defects that were tagged important by the scanner already
cmd += f" | csgrep --mode=json <(csgrep --mode=json --imp-level=1 '{js_file}') -"

# write the result into *-imp.js
imp_js_file = re.sub("\\.js", "-imp.js", js_file)
cmd += " > '%s'" % imp_js_file
Expand Down

0 comments on commit a0542ea

Please sign in to comment.