Skip to content

Commit 5e67f5e

Browse files
try again to only run phpcs on 8.3
1 parent ca09235 commit 5e67f5e

File tree

2 files changed

+23
-17
lines changed

2 files changed

+23
-17
lines changed

.github/workflows/check-php-syntax.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,26 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
10+
php-version: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
1111
steps:
1212
# Install PHP interpreter
1313
- name: Setup PHP
1414
uses: shivammathur/setup-php@v2
1515
with:
16-
php-version: ${{ matrix.php-versions }}
16+
php-version: ${{ matrix.php-version }}
1717

1818
# Checkout source repository
1919
- name: checkout repo
2020
uses: actions/checkout@v3
2121

2222
# Lint every PHP source file using PHP interpreter
23-
- run: composer run check-syntax
23+
- name: Check PHP syntax
24+
run: composer run check-syntax
2425

25-
- run: composer install --no-progress
26-
if: ${{ matrix.php-versions }} == '8.3'
27-
- run: ./vendor/bin/phpcs -ns
28-
if: ${{ matrix.php-versions }} == '8.3'
26+
- name: composer install
27+
if: ${{ matrix.php-version == '8.3' }}
28+
run: composer install --no-progress
29+
30+
- name: PHPCodeSniffer
31+
if: ${{ matrix.php-version == '8.3' }}
32+
run: ./vendor/bin/phpcs -s

phpcs.xml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
<?xml version="1.0"?>
22
<ruleset name="rules">
3-
<description>rules</description>
4-
<arg name="colors"/>
5-
<file>src/</file>
6-
<file>mailchimp-top-bar.php</file>
7-
<exclude-pattern>*\.(html|css|js)</exclude-pattern>
8-
<rule ref="Generic.Arrays.DisallowLongArraySyntax.Found"/>
9-
<rule ref="PSR12">
10-
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" />
11-
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
12-
</rule>
3+
<description>rules</description>
4+
<arg name="colors"/>
5+
<file>src/</file>
6+
<file>mailchimp-top-bar.php</file>
7+
<exclude-pattern>*\.(html|css|js)</exclude-pattern>
8+
<rule ref="Generic.Arrays.DisallowLongArraySyntax.Found"/>
9+
<rule ref="PSR12">
10+
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" />
11+
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
12+
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols" />
13+
<exclude name="Generic.Files.LineLength.TooLong" />
14+
</rule>
1315
</ruleset>

0 commit comments

Comments
 (0)