-
Notifications
You must be signed in to change notification settings - Fork 244
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
Output tweaks #172
Output tweaks #172
Conversation
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
This is lovely! ❤️ 😁 I'll have a look as soon as I can |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me!
"""This formatter outputs the issues as color-coded text.""" | ||
from ..vulnerabilities.vulnerability_helper import SanitisedVulnerability, UnknownVulnerability | ||
|
||
RESET = '\033[0m' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
@@ -64,6 +65,14 @@ def retrieve_nosec_lines( | |||
def main(command_line_args=sys.argv[1:]): # noqa: C901 | |||
args = parse_args(command_line_args) | |||
|
|||
logging_level = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is one of the prettiest ways I've seen people set the logging level.
--screen
output for ANSI colour codes (not that colourful to be honest as I didn't want to go crazy)--only-unsanitised
to not print santised vulnerabilities as they can confuse the output-v
,-vv
or-vvv