-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from sarahcssiqueira/develop
feat: wpcs by project with composer and rules set up on phpcs.xml
- Loading branch information
Showing
4 changed files
with
262 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
/vendor/ | ||
.DS_Store | ||
.phpcs.cache | ||
composer.lock | ||
composer.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="CS"> | ||
<description>XYWZ Blocks</description> | ||
<config name="testVersion" value="5.6-"/> | ||
<exclude-pattern>vendor/*</exclude-pattern> | ||
<exclude-pattern>node_modules/*</exclude-pattern> | ||
|
||
<arg value="ps"/> | ||
<arg name="colors"/> | ||
<arg name="parallel" value="100"/> | ||
<arg name="extensions" value="php"/> | ||
<arg name="cache" value=".phpcs.cache"/> | ||
|
||
<rule ref="WordPress"> | ||
<!-- PSR4 --> | ||
<exclude name="WordPress.Files.FileName" /> | ||
</rule> | ||
|
||
<rule ref="WordPress-Extra"/> | ||
|
||
<rule ref="WordPress-Docs"/> | ||
|
||
<rule ref="Generic.Metrics.CyclomaticComplexity"> | ||
<properties> | ||
<property name="complexity" value="3"/> | ||
<property name="absoluteComplexity" value="5"/> | ||
</properties> | ||
</rule> | ||
|
||
<rule ref="Generic.Metrics.NestingLevel"> | ||
<properties> | ||
<property name="absoluteNestingLevel" value="3"/> | ||
</properties> | ||
</rule> | ||
|
||
<rule ref="Generic.Arrays.DisallowShortArraySyntax.Found"> | ||
<severity>0</severity> | ||
</rule> | ||
<rule ref="Generic.Arrays.DisallowLongArraySyntax.Found"/> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"name": "sarahcssiqueira/xywz-blocks", | ||
"description": "Custom Gutenberg blocks.", | ||
"license": "GPL-2.0+", | ||
"type": "wordpress-plugin", | ||
"authors": [ | ||
{ | ||
"name": "sarahcssiqueira", | ||
"email": "[email protected]", | ||
"homepage": "https://sarahjobs.com" | ||
} | ||
], | ||
"support": { | ||
"src": "https://github.com/sarahcssiqueira/xywz-blocks", | ||
"issues": "https://github.com/sarahcssiqueira/xywz-blocks/issues" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"XYWZBlocks\\Inc\\": "./inc" | ||
} | ||
}, | ||
"scripts": { | ||
"cstd": "./vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs", | ||
"cs": "./vendor/bin/phpcs --standard=.phpcs.xml --report=summary .", | ||
"cbf": "./vendor/bin/phpcbf --standard=.phpcs.xml ." | ||
}, | ||
"require-dev": { | ||
"squizlabs/php_codesniffer": "^3.7", | ||
"wp-coding-standards/wpcs": "^2.3", | ||
"phpcompatibility/php-compatibility": "^9.3" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.