-
-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: introduce phpcs and phpstan (#159)
* chore: introduce phpcs and phpstan * feat: add phpstan command and expand config * chore: add phpcs 10-up phpcs file * chore: update tested PHP version to 8.1
- Loading branch information
Showing
6 changed files
with
81 additions
and
33 deletions.
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
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
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 @@ | ||
<?xml version="1.0"?> | ||
<ruleset> | ||
<!-- Files or directories to check --> | ||
<file>.</file> | ||
|
||
<exclude-pattern>*/node_modules/*</exclude-pattern> | ||
<exclude-pattern>*/wordpress/*</exclude-pattern> | ||
<exclude-pattern>*/vendor/*</exclude-pattern> | ||
<exclude-pattern>*/resources/*</exclude-pattern> | ||
<exclude-pattern>*/dist/*</exclude-pattern> | ||
<exclude-pattern>*/tests/*</exclude-pattern> | ||
|
||
<!-- Path to strip from the front of file paths inside reports (displays shorter paths) --> | ||
<arg name="basepath" value="." /> | ||
|
||
<!-- Set a minimum PHP version for PHPCompatibility --> | ||
<config name="testVersion" value="8.1-" /> | ||
|
||
<rule ref="10up-Default" /> | ||
<rule ref="WordPress-Core" /> | ||
<rule ref="WordPress-Docs" /> | ||
<rule ref="WordPress-Extra" /> | ||
<!-- Add VIP-specific rules --> | ||
<config name="minimum_supported_wp_version" value="6.1"/> | ||
|
||
<rule ref="WordPress.WP.I18n"> | ||
<properties> | ||
<property name="text_domain" type="array" value="timber-starter"/> | ||
</properties> | ||
</rule> | ||
|
||
</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,15 @@ | ||
parameters: | ||
editorUrl: 'vscode://file/%%file%%:%%line%%' | ||
level: 5 # Increase until "max" | ||
paths: | ||
- src/ | ||
- %currentWorkingDirectory%/ | ||
excludePaths: | ||
- tests/* | ||
- docs/* | ||
- vendor/* | ||
- wordpress/* | ||
ignoreErrors: | ||
|
||
includes: | ||
- vendor/szepeviktor/phpstan-wordpress/extension.neon |
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
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