-
Notifications
You must be signed in to change notification settings - Fork 3
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 #15 from CivicActions/feature/PGOV-300-PHPCS
Configure PHPCS for code quality checking
- Loading branch information
Showing
4 changed files
with
43 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# Run the PHP Code Fixer against the codebase. See phpcs.xml in the project | ||
# root for configuration settings. | ||
|
||
phpcbf --standard=phpcs.xml "$@" |
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,6 @@ | ||
#!/bin/bash | ||
|
||
# Run the PHP Code Sniffer against the codebase. See phpcs.xml in the project | ||
# root for configuration settings. | ||
|
||
phpcs --standard=phpcs.xml "$@" |
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,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ruleset name="drupal"> | ||
<description>PHP CodeSniffer configuration for development.</description> | ||
<!-- Specify folders. --> | ||
<file>web/modules/custom</file> | ||
<!-- <file>web/profiles/custom</file> --> | ||
<!-- <file>web/themes/custom</file> --> | ||
|
||
<arg name="extensions" value="php,module,inc,install,test,profile,theme,css,info,txt,md,yml"/> | ||
<!-- Change this value to 7 if you want to check Drupal 7 code. --> | ||
<config name="drupal_core_version" value="10"/> | ||
|
||
<!-- If you have Coder installed locally then you can reference the Drupal | ||
standards with relative paths. Otherwise simply use "Drupal" and | ||
"DrupalPractice. --> | ||
<rule ref="vendor/drupal/coder/coder_sniffer/Drupal"> | ||
<!-- Example how you would disable a rule you are not compliant with yet: | ||
<exclude name="Drupal.Commenting.Deprecated"/> | ||
--> | ||
</rule> | ||
<rule ref="vendor/drupal/coder/coder_sniffer/DrupalPractice"/> | ||
|
||
<!-- Example how you would disable an external rule you do not like: | ||
<rule ref="PEAR.Functions.ValidDefaultValue.NotAtEnd"> | ||
<severity>0</severity> | ||
</rule> | ||
--> | ||
</ruleset> |