WordPress / WordPress/WordPress-Coding-Standards
WordPress != WordPress-Core,WordPress-Docs,WordPress-Extra
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 2.8k
- Forks
- 521
- Avg merge
- 5d 20h
- Merged PRs (30d)
- 1
Description
After refreshing https://github.com/GaryJones/pwa-wp/tree/phpcs-refresh, no violations are reported when running phpcs. All good.
If I change:
<rule ref="WordPress-Core"/>
<rule ref="WordPress-Docs"/>
<rule ref="WordPress-Extra"/>
to:
<rule ref="WordPress"/>
Then new violations are reported:
FILE: wp-includes/class-wp-service-workers.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
117 | ERROR | Missing wp_unslash() before sanitization. (WordPress.Security.ValidatedSanitizedInput.MissingUnslash)
117 | ERROR | Detected usage of a non-sanitized input variable: $_SERVER
| | (WordPress.Security.ValidatedSanitizedInput.InputNotSanitized)
-----------------------------------------------------------------------------------------------------------------------------------------
Is that supposed to happen?
cc @westonruter
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the three separate rules in the referenced phpcs-refresh branch with the aggregate WordPress rule in the ruleset configuration. Run phpcs against wp-includes/class-wp-service-workers.php and inspect line 117 to reproduce the two reported violations. Done means determining whether the aggregate rule is expected to include these checks and documenting or correcting the discrepancy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100