Skip to content

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