From d6dec661a631fda217680edbddf3ee057802bf8e Mon Sep 17 00:00:00 2001 From: Danny van der Sluijs Date: Tue, 25 Mar 2025 13:30:28 +0100 Subject: [PATCH 1/3] ci: use parrallel-lint and cs2pr for improved feedback on linting errors --- .github/workflows/lint.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ffa48903..3de9e1a3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,7 +9,7 @@ on: - master jobs: - tests: + lint: name: "Lint" runs-on: ubuntu-latest @@ -27,10 +27,12 @@ jobs: - name: "Install PHP" uses: "shivammathur/setup-php@v2" with: - coverage: "none" + php-version: "${{ matrix.php-version }}" extensions: "intl" ini-values: "memory_limit=-1, error_reporting=E_ALL, display_errors=On" - php-version: "${{ matrix.php-version }}" + coverage: "none" + tools: parallel-lint, cs2pr - name: "Lint PHP files" - run: "find src/ -type f -name '*.php' -print0 | xargs -0 -L1 -P4 -- php -l -f" + run: | + parallel-lint . --checkstyle | cs2pr From 8cf39757d93ee14df32894729e00c283c7a5d65c Mon Sep 17 00:00:00 2001 From: Danny van der Sluijs Date: Tue, 25 Mar 2025 13:38:35 +0100 Subject: [PATCH 2/3] ci: include deprecations when linting files --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3de9e1a3..9ec8ca15 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -35,4 +35,4 @@ jobs: - name: "Lint PHP files" run: | - parallel-lint . --checkstyle | cs2pr + parallel-lint . --checkstyle --exclude vendor --show-deprecated | cs2pr From 41524a334d65a1ef0c9a28720aa5c116ad869164 Mon Sep 17 00:00:00 2001 From: Danny van der Sluijs Date: Tue, 25 Mar 2025 13:41:29 +0100 Subject: [PATCH 3/3] docs: include changelog entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2eef081..153be38e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added - Run PHPStan using the lowest and highest php version ([#811](https://github.com/jsonrainbow/json-schema/pull/811)) +### Fixed +- Use parallel-lint and cs2pr for improved feedback on linting errors ([#812](https://github.com/jsonrainbow/json-schema/pull/812)) ## [6.3.1] - 2025-03-18 ### Fixed