-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix broken cwe_checker plugin #280
Conversation
…ts output format, we now have to parse json instead of sexp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor changes requested
if 'WARN' in line: | ||
cwe_warning = cwe_parser.parse(line) | ||
tmp[cwe_warning.name].append(cwe_warning) | ||
j = json.loads(output) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have pre-commit set up, this would not have been allowed. Please use more semantic name to comply with coding guidelines
j = json.loads(output) | ||
if 'warnings' in j: | ||
for warning in j['warnings']: | ||
tmp[warning['name']] = tmp[warning['name']] + [warning] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer the [warning, ] syntax to explicitly show warning to be one element. If warning would be a string, the string would be split into chars using the syntax without trailing comma
echo "Cleaning up" | ||
rm -rf internal/src/_build | ||
rm -f internal/src/cwe_checker.plugin | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also remove sexpdata installation
Since cwe_checker changed its output format, we have to parse json instead of sexp. Good news: this makes the FACT plugin much smaller! 👍
Please do not merge before PR #32 of cwe_checker has been merged (fkie-cad/cwe_checker#32).