Skip to content
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

Add more_info URL to text output #359

Merged
merged 2 commits into from Aug 7, 2018
Merged

Conversation

stannum-l
Copy link
Contributor

Outputting bandit report as text does not put more_info URL while it
would if the output format is YAML or JSON. This patch set adds the
more_info URL to the text display.

Signed-off-by: Tin Lam tin@irrational.io

Outputting bandit report as text does not put `more_info` URL while it
would if the output format is YAML or JSON. This patch set adds the
`more_info` URL to the text display.

Signed-off-by: Tin Lam <tin@irrational.io>
@ghugo ghugo self-requested a review August 7, 2018 15:48
@ghugo ghugo requested a review from ericwb August 7, 2018 15:49
Copy link
Member

@ericwb ericwb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, nit change request. Otherwise good-to-go

@@ -27,6 +27,8 @@
>> Issue: [B301:blacklist_calls] Use of unsafe yaml load. Allows
instantiation of arbitrary objects. Consider yaml.safe_load().

More Info: https://bandit.readthedocs.io/en/latest/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move the more info below the location? That would be more consistent with other formatters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -81,6 +84,9 @@ def _output_issue_str(issue, indent, show_lineno=True, show_code=True,
bits.append("%s>> Issue: [%s:%s] %s" % (
indent, issue.test_id, issue.test, issue.text))

bits.append("%s More Info: %s" % (
indent, docs_utils.get_url(issue.test_id)))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move to after location

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@ericwb ericwb merged commit a9fe5e5 into PyCQA:master Aug 7, 2018
@stannum-l stannum-l deleted the text-link branch August 8, 2018 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants