Skip to content

Include the line number when using HTML output format#683

Merged
ericwb merged 1 commit into
masterfrom
unknown repository
Dec 27, 2020
Merged

Include the line number when using HTML output format#683
ericwb merged 1 commit into
masterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Dec 25, 2020

This commit is to include the line number of a given occurrence when using HTML output format.

Resolves: #672

@ghost ghost requested review from ericwb, ghugo, lukehinds and sigmavirus24 as code owners December 25, 2020 22:48
Comment thread bandit/formatters/html.py Outdated
@ericwb ericwb changed the title This commit is to include the line number of a given occurance when u… Include the line number when using HTML output format Dec 27, 2020
Copy link
Copy Markdown
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.

Looks mostly ready. Ideally you could include the column number too, but could be in a separate PR. Thanks for the PR!

Comment thread bandit/formatters/html.py Outdated
Comment thread bandit/formatters/html.py
<b>Confidence: </b>{confidence}<br>
<b>File: </b><a href="{path}" target="_blank">{path}</a> <br>
<b>Line number: </b>{line_number}</a> <br>
<b>More info: </b><a href="{url}" target="_blank">{url}</a><br>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How about also adding the column number? Thanks

Copy link
Copy Markdown
Author

@ghost ghost Dec 27, 2020

Choose a reason for hiding this comment

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

No problem! I'll attempt that change in another PR. Thanks for taking a look!

@ghost ghost requested a review from ericwb December 27, 2020 04:02
Copy link
Copy Markdown
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.

LGTM

Copy link
Copy Markdown
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.

Oops, just noticed a stray in your HTML

Comment thread bandit/formatters/html.py Outdated
@ghost ghost requested a review from ericwb December 27, 2020 04:17
@ericwb ericwb merged commit 8eee173 into PyCQA:master Dec 27, 2020
@ghost ghost deleted the aludwin/627 branch December 27, 2020 05:20
mikespallino pushed a commit to mikespallino/bandit that referenced this pull request Aug 25, 2021
mikespallino pushed a commit to mikespallino/bandit that referenced this pull request Jan 7, 2022
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.

HTML formatter is missing line number

3 participants