Skip to content

Commit

Permalink
Simplify PHPCS setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Sep 11, 2023
1 parent aab5acd commit 0b212eb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .pronamic-build-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
# PHP_CodeSniffer (https://github.com/squizlabs/PHP_CodeSniffer)
/phpcs.xml.dist
/phpcs.xml
/phpcs-text-domain-fixer.xml

# phpDocumentor (https://www.phpdoc.org/)
/phpdoc.dist.xml
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
}
},
"scripts": {
"build": "vendor/bin/pronamic wp-build",
"build": "vendor/bin/pronamic wp-build --text-domain-fixer=phpcs-text-domain-fixer.xml",
"translate": [
"@build",
"rsync --recursive --delete --verbose ./build/project/languages/ ./languages/",
Expand All @@ -135,7 +135,7 @@
"coverage-text": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text",
"coveralls": "vendor/bin/php-coveralls -v",
"phpcbf": "XDEBUG_MODE=off vendor/bin/phpcbf",
"phpcs": "XDEBUG_MODE=off vendor/bin/phpcs -s -v --ignore=packages,build",
"phpcs": "XDEBUG_MODE=off vendor/bin/phpcs -s -v",
"phplint": "find src tests -name '*.php' | xargs -n 1 -P 4 php -l",
"phpmd": "vendor/bin/phpmd src,tests text phpmd.ruleset.xml --suffixes php",
"phpstan": "XDEBUG_MODE=off vendor/bin/phpstan analyse --memory-limit=-1",
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<exclude-pattern type="relative">^deploy/*</exclude-pattern>
<exclude-pattern type="relative">^documentation/*</exclude-pattern>
<exclude-pattern type="relative">^node_modules/*</exclude-pattern>
<exclude-pattern type="relative">^packages/*</exclude-pattern>
<exclude-pattern type="relative">^src/phpcompatibility/*</exclude-pattern>
<exclude-pattern type="relative">^src/wpcs/*</exclude-pattern>
<exclude-pattern type="relative">^vendor/*</exclude-pattern>
Expand Down Expand Up @@ -36,7 +37,7 @@
</properties>
</rule>

<rule ref="phpcs-i18n.xml" />
<rule ref="phpcs-text-domain-fixer.xml" />

<rule ref="Generic.Files.EndFileNewline.NotFound">
<exclude-pattern>src/readme-md/installation.php</exclude-pattern>
Expand Down

0 comments on commit 0b212eb

Please sign in to comment.