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 format-ignore-exit-code configuration #285

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sirreal
Copy link

@sirreal sirreal commented Nov 5, 2024

Add a new configuration option to ignore formatter exit codes.

Some formatters use non-zero exit codes when formatting was successful. See #183.

For example, phpcbf uses a non-zero exit code that cannot be configured at this time: squizlabs/PHP_CodeSniffer#2898

Fixes #183.

#271 can likely also be closed with if this change lands.

LintOnSave bool `yaml:"lint-on-save" json:"lintOnSave"`
FormatCommand string `yaml:"format-command" json:"formatCommand"`
FormatCanRange bool `yaml:"format-can-range" json:"formatCanRange"`
FormatIgnoreExitCode bool `yaml:"format-ignore-exit-code" json:"formatIgnoreExitCode"`
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a big whitespace diff here, but only this line was changed.

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.

Ability to ignore the format command exit code
1 participant