Skip to content

Commit f769861

Browse files
Use parallel-lint and cs2pr for improved feedback on linting errors (#812)
This pull request includes changes to the `.github/workflows/lint.yml` file to improve the linting process for the project. The most important changes include renaming the job from "tests" to "lint", updating the PHP setup configuration, and modifying the linting command. Improvements to linting workflow: * [`.github/workflows/lint.yml`](diffhunk://#diff-107e910e9f2ebfb9a741fa10b2aa7100cc1fc4f5f3aca2dfe78b905cbd73c0d2L12-R12): Renamed the job from "tests" to "lint" to better reflect its purpose. * [`.github/workflows/lint.yml`](diffhunk://#diff-107e910e9f2ebfb9a741fa10b2aa7100cc1fc4f5f3aca2dfe78b905cbd73c0d2L30-R38): Updated the PHP setup configuration to include `parallel-lint` and `cs2pr` tools, and reordered the `php-version` and `coverage` parameters for clarity. * [`.github/workflows/lint.yml`](diffhunk://#diff-107e910e9f2ebfb9a741fa10b2aa7100cc1fc4f5f3aca2dfe78b905cbd73c0d2L30-R38): Modified the linting command to use `parallel-lint` with `cs2pr` for better parallel processing and reporting.
1 parent e199ea2 commit f769861

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/lint.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- master
1010

1111
jobs:
12-
tests:
12+
lint:
1313
name: "Lint"
1414

1515
runs-on: ubuntu-latest
@@ -27,10 +27,12 @@ jobs:
2727
- name: "Install PHP"
2828
uses: "shivammathur/setup-php@v2"
2929
with:
30-
coverage: "none"
30+
php-version: "${{ matrix.php-version }}"
3131
extensions: "intl"
3232
ini-values: "memory_limit=-1, error_reporting=E_ALL, display_errors=On"
33-
php-version: "${{ matrix.php-version }}"
33+
coverage: "none"
34+
tools: parallel-lint, cs2pr
3435

3536
- name: "Lint PHP files"
36-
run: "find src/ -type f -name '*.php' -print0 | xargs -0 -L1 -P4 -- php -l -f"
37+
run: |
38+
parallel-lint . --checkstyle --exclude vendor --show-deprecated | cs2pr

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99
### Added
1010
- Run PHPStan using the lowest and highest php version ([#811](https://github.com/jsonrainbow/json-schema/pull/811))
11+
### Fixed
12+
- Use parallel-lint and cs2pr for improved feedback on linting errors ([#812](https://github.com/jsonrainbow/json-schema/pull/812))
1113

1214
## [6.3.1] - 2025-03-18
1315
### Fixed

0 commit comments

Comments
 (0)