-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c601778
commit ac9e60e
Showing
2 changed files
with
36 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,24 @@ | ||
name: Drupal coding standards | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
phpcs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: shivammathur/setup-php@verbose | ||
with: | ||
php-version: 8.1 | ||
coverage: none | ||
tools: composer:v2, cs2pr, dealerdirect/phpcodesniffer-composer-installer:*, drupal/coder | ||
- name: Get composer cache directory | ||
id: composercache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composercache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
- name: Detect coding standard violations | ||
run: phpcs -q --report=checkstyle | cs2pr --graceful-warnings |
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,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ruleset name="civicrm_entity"> | ||
<description>PHP CodeSniffer configuration for CiviCRM entity.</description> | ||
<file>.</file> | ||
<arg name="extensions" value="php,module,inc,install,test,profile,theme,info,yml"/> | ||
|
||
<exclude-pattern>*/vendor/*</exclude-pattern> | ||
<exclude-pattern>*/node_modules/*</exclude-pattern> | ||
|
||
<rule ref="Drupal"/> | ||
<rule ref="DrupalPractice"/> | ||
</ruleset> |