From 3e1d501986beca407341218bd2fba85c38cf66c9 Mon Sep 17 00:00:00 2001 From: Nilambar Sharma Date: Thu, 14 Nov 2024 14:49:59 +0545 Subject: [PATCH] Add linter for sniffs --- .github/workflows/php-lint.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.github/workflows/php-lint.yml b/.github/workflows/php-lint.yml index 924378b15..4087b95cd 100644 --- a/.github/workflows/php-lint.yml +++ b/.github/workflows/php-lint.yml @@ -61,3 +61,32 @@ jobs: - name: PHPMD run: composer phpmd + + php-lint-sniffs: + name: PHP (Sniffs) + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v4 + + - uses: shivammathur/setup-php@v2 + with: + php-version: '8.0' + + - name: Validate Composer configuration + working-directory: "phpcs-sniffs" + run: composer validate + + - name: Install PHP dependencies + uses: ramsey/composer-install@57532f8be5bda426838819c5ee9afb8af389d51a + with: + composer-options: '--prefer-dist' + working-directory: "phpcs-sniffs" + + - name: PHP Lint + working-directory: "phpcs-sniffs" + run: composer lint + + - name: PHP Lint PHPCS + working-directory: "phpcs-sniffs" + run: composer check-cs