* fix: address PR #10 CodeRabbit review feedback - Fix SC2115 shellcheck warning in build.sh (use ${var:?} for safe rm -rf) - Fix SC2164 shellcheck warning in build.sh (cd build || exit 1) - Standardise bullet points from hyphens to asterisks in .wiki/Contributing.md - Refine verb formality in readme.txt, README.md, .wiki/Contributing.md, .wiki/Coding-Standards.md - Clarify PHPDoc wording in .wiki/Coding-Standards.md - Add clarifying comment to phpcs-simple.xml arg value * fix: re-enable PHPUnit test step in tests.yml Tests were commented out in PR #10. PHPUnit test files exist in tests/phpunit/ and phpunit.xml is configured. Re-enabling the step so tests actually run in CI. Closes #45 * fix: remove redundant composer require steps in code-quality workflow szepeviktor/phpstan-wordpress, wp-coding-standards/wpcs, and dealerdirect/phpcodesniffer-composer-installer are already declared in composer.json require-dev. The extra 'composer require' steps after 'composer install' caused a second packagist.org network hit that timed out in CI, failing the PHPStan Static Analysis job. Fixes the Code Quality CI failure on PR #51 (issue #45).
58 lines
2.0 KiB
XML
58 lines
2.0 KiB
XML
<?xml version="1.0"?>
|
|
<ruleset name="WordPress Plugin Starter Template Simple">
|
|
<description>A simplified ruleset for WordPress Plugin Starter Template.</description>
|
|
|
|
<!-- Check all PHP files in directory tree by default. -->
|
|
<file>.</file>
|
|
|
|
<!-- Exclude paths -->
|
|
<exclude-pattern>*/vendor/*</exclude-pattern>
|
|
<exclude-pattern>*/node_modules/*</exclude-pattern>
|
|
<exclude-pattern>*/bin/*</exclude-pattern>
|
|
<exclude-pattern>*/.github/*</exclude-pattern>
|
|
<exclude-pattern>*/tests/*</exclude-pattern>
|
|
<exclude-pattern>*/build/*</exclude-pattern>
|
|
<exclude-pattern>*/dist/*</exclude-pattern>
|
|
|
|
<!-- Command line arguments: combined short flags (-s shows sniff codes, -p shows progress) -->
|
|
<arg value="sp"/>
|
|
<arg name="extensions" value="php"/>
|
|
<arg name="basepath" value="."/>
|
|
<arg name="parallel" value="8"/>
|
|
|
|
<!-- Configs -->
|
|
<config name="minimum_supported_wp_version" value="5.0"/>
|
|
<config name="testVersion" value="7.0-"/>
|
|
|
|
<!-- Rules -->
|
|
<rule ref="WordPress">
|
|
<!-- Exclude rules that are too strict for this project -->
|
|
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
|
|
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
|
|
</rule>
|
|
|
|
<!-- Additional rules for better code quality -->
|
|
<rule ref="Generic.Formatting.MultipleStatementAlignment">
|
|
<properties>
|
|
<property name="maxPadding" value="1"/>
|
|
<property name="error" value="false"/>
|
|
</properties>
|
|
</rule>
|
|
|
|
<!-- Use spaces for indentation -->
|
|
<rule ref="Generic.WhiteSpace.ScopeIndent">
|
|
<properties>
|
|
<property name="indent" value="4"/>
|
|
<property name="tabIndent" value="false"/>
|
|
</properties>
|
|
</rule>
|
|
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
|
|
|
|
<!-- Enforce proper line endings -->
|
|
<rule ref="Generic.Files.LineEndings">
|
|
<properties>
|
|
<property name="eolChar" value="\n"/>
|
|
</properties>
|
|
</rule>
|
|
</ruleset>
|