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

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

Open
LennyN95 opened this issue Oct 30, 2024 · 3 comments
Open

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

LennyN95 opened this issue Oct 30, 2024 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@LennyN95
Copy link
Contributor

LennyN95 commented Oct 30, 2024

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.

@LennyN95
Copy link
Contributor Author

LennyN95 commented Oct 30, 2024

Now I see that there is an option args that I overlooked before.
Although args: --runtime-set ignore_warnings_on_exit 1 is sufficient, a separate option might make it easier to use, because I think that aborting on warnings is not the generally desired behavior in CI pipelines.

@LennyN95 LennyN95 changed the title Specify --config-set to complete with warnings Specify --runtime-set to complete with warnings Oct 30, 2024
@g105b
Copy link
Member

g105b commented Nov 18, 2024

Hi! Yes it's still maintained, and I use it every day for my development, but currently my free time is very limited on open source contributions. I'd love to do more open source work, but I've yet to find a way to get it to pay the bills!

That being said, I will certainly look at adding a specific option for this, as I'd like to keep this Github Action the best it can possibly be.

Thanks for your input raising this issue. I'll address it when I get some time aside.

@g105b g105b added enhancement New feature or request good first issue Good for newcomers labels Nov 18, 2024
@g105b
Copy link
Member

g105b commented Nov 18, 2024

Oh! It looks like you're already ahead of me! I should have checked the other issues and PRs before answering :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Development

No branches or pull requests

2 participants