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 its own class for curl on WordPress.WP.AlternativeFunctions #2451

Closed
stefanolissa opened this issue Jun 12, 2024 · 2 comments
Closed

Add its own class for curl on WordPress.WP.AlternativeFunctions #2451

stefanolissa opened this issue Jun 12, 2024 · 2 comments

Comments

@stefanolissa
Copy link

Hi, since curl sometimes needs to be used, for example, when the multi_exec() is used and cannot be replaced by wp_remote_*, having a specific class like WordPress.WP.AlternativeFunctions.Curl to group all the curl functions would help to disable that sniff in a file. Otherwise a lot of phpcs:disable comments should be added.

I tried to seek a way to disable the sniffs with a "start-with" rule, but I didn't find it.

Thanks.

@jrfnl
Copy link
Member

jrfnl commented Jun 12, 2024

Not exactly what you are looking for, but disabling the curl group (or any group) is a existing feature and has been around for forever. See: https://github.com/WordPress/WordPress-Coding-Standards/wiki/Customizable-sniff-properties#various-sniffs-excluding-a-group-of-checks

This property works code-base wide though, so is not file specific.

@stefanolissa
Copy link
Author

That's perfect, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants