File: phpcs.yml

package info (click to toggle)
matomo 5.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 95,068 kB
  • sloc: php: 289,425; xml: 127,249; javascript: 112,130; python: 202; sh: 178; makefile: 20; sql: 10
file content (38 lines) | stat: -rw-r--r-- 938 bytes parent folder | download
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
37
38
name: PHPCS check

on: pull_request

permissions:
  actions: read
  checks: read
  contents: read
  deployments: none
  issues: read
  packages: none
  pull-requests: read
  repository-projects: none
  security-events: none
  statuses: read

jobs:
  phpcs:
    name: PHPCS
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v6
        with:
          lfs: false
          persist-credentials: false
      - name: Install dependencies
        run: composer install --dev --prefer-dist --no-progress --no-suggest
      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: '7.2'
          tools: cs2pr
      - name: Check PHP code styles
        id: phpcs
        run: ./vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml
      - name: Show PHPCS results in PR
        if: ${{ always() && steps.phpcs.outcome == 'failure' }}
        run: cs2pr ./phpcs-report.xml