-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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: Remove sneaky unicode characters that break a regex and console outputs on Windows #6987
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -488,7 +488,7 @@ def print_reports( | |
) | ||
|
||
# Remove colors from the cli output | ||
ansi_escape = re.compile(r'(?:\x1B[@-_]|[\x80-\x9F])[0–9:;<=>?]*[ -/]*[@-~]') | ||
ansi_escape = re.compile(r'(?:\x1B[@-_]|[\x80-\x9F])[0-9:;<=>?]*[ -/]*[@-~]') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line makes a wrong regex, notice a wrong dash |
||
data_outputs['cli'] = ansi_escape.sub('', cli_output) | ||
if "sarif" in config.output: | ||
sarif = Sarif(reports=sarif_reports, tool=self.tool) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ def __init__(self) -> None: | |
""" | ||
https://kubernetes.io/docs/concepts/configuration/overview/ | ||
|
||
Don’t specify a hostPort for a Pod unless it is absolutely necessary. | ||
Don't specify a hostPort for a Pod unless it is absolutely necessary. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line was changed by the script I made to go over this repo to find bad unicode characters. |
||
When you bind a Pod to a hostPort, it limits the number of places the | ||
Pod can be scheduled, because each <hostIP, hostPort, protocol> combination | ||
must be unique. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ def get_scannable_file_paths(root_folder: str | None = None, excluded_paths: lis | |
return files_list | ||
|
||
for root, d_names, f_names in os.walk(root_folder): | ||
# Don't walk in to "node_modules" directories under the root folder. If –for some reason– | ||
# Don't walk in to "node_modules" directories under the root folder. If for some reason | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line was changed by the script I made to go over this repo to find bad unicode characters. |
||
# scanning one of these is desired, it can be directly specified. | ||
if "node_modules" in d_names: | ||
d_names.remove("node_modules") | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ def __init__(self): | |
""" | ||
https://kubernetes.io/docs/concepts/configuration/overview/ | ||
|
||
Don’t specify a hostPort for a Pod unless it is absolutely necessary. | ||
Don't specify a hostPort for a Pod unless it is absolutely necessary. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line was changed by the script I made to go over this repo to find bad unicode characters. |
||
When you bind a Pod to a hostPort, it limits the number of places the | ||
Pod can be scheduled, because each <hostIP, hostPort, protocol> combination | ||
must be unique. | ||
|
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 line causes problems with outputs, notice a symbol before
\n