Skip to content

Commit

Permalink
PHPCS config update and clean up composer.json
Browse files Browse the repository at this point in the history
  • Loading branch information
edjeavons committed Sep 9, 2023
1 parent 04e499f commit 9f39718
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 36 deletions.
69 changes: 36 additions & 33 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,40 @@
{
"name": "eighteen73/wp-cli-tools",
"description": "WP-CLI commands to assist in our development workflow",
"type": "wp-cli-package",
"license": "MIT",
"authors": [
{
"name": "Ed Jeavons",
"email": "ed@orphans.co.uk"
}
"name": "eighteen73/wp-cli-tools",
"description": "WP-CLI commands to assist in our development workflow",
"type": "wp-cli-package",
"license": "MIT",
"authors": [
{
"name": "Ed Jeavons",
"email": "ed@orphans.co.uk"
}
],
"minimum-stability": "stable",
"require": {
"php": ">=8.0",
"ext-json": "*",
"eighteen73/wordpress-coding-standards": "dev-main"
},
"require-dev": {
"eighteen73/phpcs-composer": "^1.0.0",
"wp-cli/wp-cli-bundle": "^2.6"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"autoload": {
"files": [
"wp-cli-tools.php"
],
"minimum-stability": "stable",
"require": {
"php": "^7.4 || ^8.0",
"ext-json": "*"
},
"require-dev": {
"eighteen73/phpcs-composer": "^1.0.0",
"wp-cli/wp-cli-bundle": "^2.6"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"autoload": {
"files": [ "wp-cli-tools.php" ],
"psr-4": {
"Eighteen73\\WP_CLI\\": "src/"
}
},
"scripts": {
"test": [
"phpcs"
]
"psr-4": {
"Eighteen73\\WP_CLI\\": "src/"
}
},
"scripts": {
"test": [
"phpcs"
]
}
}
21 changes: 18 additions & 3 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
<?xml version="1.0"?>
<ruleset name="Project Rules">
<rule ref="Eighteen73-WordPress-Default" />

<!-- Scan all files in directory -->
<file>.</file>
<exclude-pattern>dist/</exclude-pattern>
<exclude-pattern>vendor/</exclude-pattern>
<exclude-pattern>tests/</exclude-pattern>
<exclude-pattern>/vendor</exclude-pattern>

<!-- Scan only PHP files -->
<arg name="extensions" value="php"/>

<!-- Show colors in console -->
<arg value="-colors"/>

<!-- Show sniff codes in all reports -->
<arg value="ns"/>

<rule ref="Squiz.PHP.EmbeddedPhp">
<exclude name="Squiz.Commenting.FileComment.Missing"/>
</rule>

<rule ref="Eighteen73-WordPress-Default" />
</ruleset>

0 comments on commit 9f39718

Please sign in to comment.