Files
comic-easel/phpcs.xml.dist
coraislovely-code ae0b992fb0 Add CI: syntax lint, unit tests, and scoped PHPCS
Three jobs, each earning its place:

- php -l across PHP 7.4 through 8.4. The cheapest useful signal here: the plugin's recent
  history is PHP 8 compatibility work and it advertises support in readme.txt, but nothing
  has ever verified that on more than whichever interpreter the maintainer happened to run.
- PHPUnit on 8.2-8.4.
- PHPCS with the WordPress security and prepared-SQL sniffs.

The PHPCS job is scoped to the files a pull request actually changes. This is the difference
between the job being useful and being ignored: an unscoped run reports thousands of
pre-existing findings across decade-old code, which would make it permanently red and train
everyone to skip past it. Scoped, it only speaks up about code someone is touching now.

The ruleset is likewise narrow on purpose -- WordPress.Security, PreparedSQL,
PreparedSQLPlaceholders and EnqueuedResources -- rather than the full WordPress-Extra. Those
are the sniffs matching the bug classes this plugin has actually had. Widening it is a
separate decision from turning it on.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-25 08:36:46 -04:00

30 lines
1.0 KiB
XML

<?xml version="1.0"?>
<ruleset name="Comic Easel">
<description>
Escaping and security sniffs for Comic Easel.
Scoped deliberately narrow. The plugin predates these standards by a decade and a
full WordPress-Extra run reports thousands of pre-existing findings, which would
bury the ones that matter. Start with the sniffs that catch the bug classes this
plugin has actually had -- unescaped output, unprepared SQL, missing nonce and
capability checks -- and widen later if anyone has the appetite.
</description>
<file>.</file>
<exclude-pattern>/vendor/*</exclude-pattern>
<exclude-pattern>/tests/*</exclude-pattern>
<exclude-pattern>/js/jscalendar-*/*</exclude-pattern>
<arg name="extensions" value="php"/>
<arg name="colors"/>
<arg value="sp"/>
<config name="minimum_wp_version" value="4.8"/>
<config name="testVersion" value="7.4-"/>
<rule ref="WordPress.Security"/>
<rule ref="WordPress.DB.PreparedSQL"/>
<rule ref="WordPress.DB.PreparedSQLPlaceholders"/>
<rule ref="WordPress.WP.EnqueuedResources"/>
</ruleset>