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

WIP: Low severity threshold #725

Closed
wants to merge 4 commits into from
Closed

WIP: Low severity threshold #725

wants to merge 4 commits into from

Conversation

ernilambar
Copy link
Member

@ernilambar ernilambar commented Oct 18, 2024

Fixes #691

  • Introduce flag in CLI for including low severity errors.
  • Behat test added for testing new flag

@ernilambar
Copy link
Member Author

Example:
Before with no severity argument

FILE: pc-sample.php
type,code,severity
ERROR,allow_unfiltered_uploads_detected,7
ERROR,plugin_header_non_functional_plugin_uri,7
ERROR,localhost_code_detected,8
ERROR,obfuscated_code_detected,6
ERROR,WordPress.WP.I18n.MissingTranslatorsComment,5
ERROR,WordPress.WP.I18n.TextDomainMismatch,5
ERROR,WordPress.WP.I18n.NonSingularStringLiteralDomain,5
ERROR,WordPress.Security.EscapeOutput.OutputNotEscaped,5

With --error-severity=7:

FILE: pc-sample.php
type,code,severity
ERROR,allow_unfiltered_uploads_detected,7
ERROR,plugin_header_non_functional_plugin_uri,7
ERROR,localhost_code_detected,8

With --error-severity=7 --include-low-severity-errors:

FILE: pc-sample.php
type,code,severity
ERROR,allow_unfiltered_uploads_detected,7
ERROR,plugin_header_non_functional_plugin_uri,7
ERROR,localhost_code_detected,8
ERROR_EXTRA,obfuscated_code_detected,6
ERROR_EXTRA,WordPress.WP.I18n.MissingTranslatorsComment,5
ERROR_EXTRA,WordPress.WP.I18n.TextDomainMismatch,5
ERROR_EXTRA,WordPress.WP.I18n.NonSingularStringLiteralDomain,5
ERROR_EXTRA,WordPress.Security.EscapeOutput.OutputNotEscaped,5

@ernilambar ernilambar closed this Oct 18, 2024
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.

Show errors with severity less than a number as a warning
1 participant