-
Notifications
You must be signed in to change notification settings - Fork 10
36 lines (28 loc) · 1.03 KB
/
wpcs.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: WordPress Coding Standards
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
wpcs:
name: WPCS Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up PHP
uses: shivammathur/setup-php@2.26.0
with:
php-version: '8.2.11'
tools: composer, cs2pr
- name: Set Composer allow-plugins config
run: composer config --global allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
- name: Set Composer allow-plugins config
run: composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
- name: Install dependencies
run: |
composer global require wp-coding-standards/wpcs dealerdirect/phpcodesniffer-composer-installer --dev
- name: Run WPCS
run: |
~/.composer/vendor/bin/phpcs --standard=WordPress src/resources/* src/src/* src/index.php src/plugin-name.php --report=checkstyle | cs2pr