-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 1.09 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: lint
on:
push:
branches:
jobs:
phpcs:
name: Run PHPCS with Drupal Standards
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up PHP and Composer
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
tools: phpcs
coverage: none
- name: Install Drupal Coder Standards
run: |
composer global config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer global require --no-interaction drupal/coder slevomat/coding-standard
COMPOSER_HOME=$(composer config --global home)
phpcs --config-set installed_paths \
"$COMPOSER_HOME/vendor/drupal/coder/coder_sniffer,$COMPOSER_HOME/vendor/slevomat/coding-standard"
phpcs -i
- name: Run PHPCS
run: phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme --ignore=vendor/ ./
- name: Run DrupalPractice
run: phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme --ignore=vendor/ ./