Skip to content

Commit

Permalink
Merge pull request #3 from ericwb/error_code
Browse files Browse the repository at this point in the history
Add regex to get error code from bandit output
  • Loading branch information
braver authored Mar 9, 2018
2 parents e17e85b + 180a7cf commit 9a97585
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Bandit(PythonLinter):
version_re = r'^bandit\s(?P<version>\d+.\d+.\d+)'
version_requirement = '>= 1.3.0'
regex = (
r'^>>\sIssue:\s\[.+\]\s(?P<message>.+)$\r?\n'
r'^>>\sIssue:\s\[(?P<code>[B]\d+):.+\]\s(?P<message>.+)$\r?\n'
r'^.*Severity:\s(?:(?P<error>High)|(?P<warning>(Medium|Low))).*$\r?\n'
r'^.*Location:.*:(?P<line>\d+)$\r?\n'
)
Expand Down

0 comments on commit 9a97585

Please sign in to comment.