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

Fix location of same-file findings-divider (--------) #3046

Merged
merged 3 commits into from May 6, 2021

Conversation

chmccreery
Copy link
Contributor

When multiple findings exist for a file, we print a ------ between them. However, for autofix, we were then printing the autofix after that line, visually grouping it with the wrong item.

The easiest fix is to move the autofix print above finding_to_line, which is where the concluding ----- gets printed. Alternatively, we could keep the logic for printing the divider one level up, in build_normal_output.

Before:
Screen Shot 2021-05-05 at 3 55 22 PM
After:
Screen Shot 2021-05-05 at 4 06 09 PM

PR checklist:

  • changelog is up to date

…em. However, for autofix, we were then printing the autofix after that line, visually grouping it with the wrong item. The easiest fix is to move the autofix print above finding_to_line, which is where the conclusing ----- gets printed. Alternatively, we could keep the logic for printing the divider one level up, in build_normal_output
@mschwager mschwager self-requested a review May 6, 2021 13:07
Copy link
Contributor

@mschwager mschwager left a comment

Choose a reason for hiding this comment

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

Nice! 🐛 🔨

@chmccreery chmccreery merged commit ecadf44 into develop May 6, 2021
@chmccreery chmccreery deleted the fix-line-separator-autofix branch May 6, 2021 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants