Output tweaks#172
Merged
Merged
Conversation
Collaborator
Author
|
I just removed the underline from the sink in the images above as it obscures underscores. Otherwise it's the same. |
Prints vulnerabilities with ANSI colour codes for the terminal. Not crazily colourful: just tries to highlight the important stuff. Repeated filenames aren't printed. Colour scheme might not be to everyone's taste.
It is sometimes what you want, but often you just want the failures without sanitised vulns in the output.
Very basic python logging added to pyt. Very useful when you want to see: - which files are being processed - if your imports are not being inspected - which file crashed pyt
Collaborator
|
This is lovely! ❤️ 😁 I'll have a look as soon as I can |
KevinHock
approved these changes
Sep 7, 2018
| """This formatter outputs the issues as color-coded text.""" | ||
| from ..vulnerabilities.vulnerability_helper import SanitisedVulnerability, UnknownVulnerability | ||
|
|
||
| RESET = '\033[0m' |
KevinHock
reviewed
Sep 7, 2018
| def main(command_line_args=sys.argv[1:]): # noqa: C901 | ||
| args = parse_args(command_line_args) | ||
|
|
||
| logging_level = ( |
Collaborator
There was a problem hiding this comment.
This is one of the prettiest ways I've seen people set the logging level.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--screenoutput for ANSI colour codes (not that colourful to be honest as I didn't want to go crazy)--only-unsanitisedto not print santised vulnerabilities as they can confuse the output-v,-vvor-vvv