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

Add maxWarnings config option to allow zero-code exit if number of violations is below a threshold #3389

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sergey-solo
Copy link

@sergey-solo sergey-solo commented Jul 15, 2021

I see there's open PR that adds baseline check. This PR addresses same problem: introducing PHPCS to legacy projects where the number of issues is too great to address them immediately.

--max-warnings option will not silence the issues, the emphasis is on exit-code only.

Basically, if there's 50 errors or warnings, providing --max-warnings=50 will allow to still exit with 0.

There's a caveat, though: if you a make changes to a file with pre-existing violations, you might want to compensate --max-warnings value by the number of old violations that were fixed(if any) in order to not swallow newly created violations(if any) anywhere in the codebase.

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.

1 participant