Skip to content

Specify --runtime-set to complete with warnings #2

Open
@LennyN95

Description

@LennyN95

First of all, thank you for providing this extension. Assuming it is still maintained, I'd like to motivate to integrate a way to set configurations for phpcs.

As discussed in squizlabs/PHP_CodeSniffer#262, phpcs fails with a non-zero error code even if there are only warnings. As many others, for our CI, we want errors to be displayed (so setting the severity is not an option) but the pipeline to succeed as long as there are no errors.

This has been implemented to phpcs (see squizlabs/PHP_CodeSniffer#262 (comment)) and can be specified with an cli argument:

phpcs --runtime-set ignore_warnings_on_exit 1
phpcs --runtime-set ignore_errors_on_exit 1

phpcs --config-set ignore_warnings_on_exit 1
phpcs --config-set ignore_errors_on_exit 1

It would be helpful to either have distinct boolean parameters, e.g. fail_on_warnings: true and fail_on_error: true or a more general config: [] prameter to specify --config-set from this action.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions