Source links from log output of linter
已回答
I run "Bandit", which is an open source linter that looks for possible security issues in Python source.
The output looks like:
>> Issue: [B607:start_process_with_partial_path] Starting a process with a partial executable path
Severity: Low Confidence: High
Location: somedir/subdir/sourcefile.py:6961
6960 try:
6961 subprocess.check_output(["docker", "cp", src_rpm_file,
6962 dst_location])
6963 except subprocess.CalledProcessError:
I want PyCharm to add hot links from the log output to the indicated file and line numbers.
I can run Bandit from Tox or Bash, or probably other ways. I can pipe the output through sed or awk to a different format if that will help PyCharm recognize the source location.
How can I get PyCharm to create these links?
请先登录再写评论。
I installed Bandit as and External Tool and setup a simple output filter. Works like (py)charm! :-)