Repository navigation
Run the checks of Codacy's WordPress standard in CI as well - #179
Conversation
Codacy's "WordPress" coding standard turns on checks that the plugin's own configuration did not run. Each one that fits the WordPress style and passes on the plugin is now in a configuration file that both CI and Codacy read, so a pull request gets the same checks before Codacy runs: - PHPCS: 24 checks join phpcs-wordpress.xml (PHPCS's own standards and Slevomat, now a dev dependency); codacy-configs.py copies Slevomat into phpcs.xml. The checks that contradict the WordPress style, such as Yoda conditions and tab indentation, are listed there as left out, with the reason for each. - Biome: biome.json turns on Codacy's 232 lint rules; npm run lint:biome runs it with Biome 2.5.14, the version Codacy uses. - Pylint: .pylintrc turns on Codacy's 95 checks. - Bandit: bandit.yml runs every test. The lint job runs Pylint, Bandit, and Biome, which lint-requirements.txt and package.json pin. PHPMD and markdownlint already ran every check Codacy turns on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
🟢 Coverage ∅ diff coverage · +0.00% coverage variation
Metric Results Coverage variation ✅ +0.00% coverage variation (-1.00%) Diff coverage ✅ ∅ diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (7680447) 877 663 75.60% Head commit (e42acb5) 877 (+0) 663 (+0) 75.60% (+0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#179) 0 0 ∅ (not applicable) Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
Thanks for contributing to EngineScript Site Optimizer! Before we review:
Security Reminder
We'll review your PR soon. |
Summary
Codacy's "WordPress" coding standard turns on checks that the plugin's own configuration didn't run. Each one that fits the WordPress style and passes on the plugin now lives in a configuration file that both CI and Codacy read. A pull request from any machine gets the same checks before Codacy sees it.
phpcs-wordpress.xml(CI), copied intophpcs.xml(Codacy)slevomat/coding-standard8.22.1, the newest release for PHPCS 3). The checks that contradict the WordPress style, such as Yoda conditions, tab indentation and no spaces inside parentheses, are listed in the file as left out, each with its reason.biome.jsonnpm run lint:biomeruns Biome 2.5.14, the version Codacy uses.pylintrcbandit.yml.github/lint-requirements.txt, and Biome inpackage.json.codacy-configs.pynow copies Slevomat rules intophpcs.xml, because Codacy installs Slevomat.Testing
phpcs-wordpress.xmland the regeneratedphpcs.xmlreport nothing;phpcs.xmlmatches the full ruleset for every rule from a Codacy-installed standard.composer check-all(153 tests), markdownlint, Ruff, strict mypy, yamllint, actionlint, zizmor (no change) and gitleaks pass.🤖 Generated with Claude Code