Skip to content

Commit ce14899

Browse files
authored
Merge pull request #131 from wp-cli/add/parallel-lint-excludes
2 parents 42d1291 + 79f5789 commit ce14899

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/reusable-code-quality.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ name: Code Quality Checks
22

33
on:
44
workflow_call:
5+
inputs:
6+
parallel-lint-excludes:
7+
description: 'Additional folders for parallel-lint to exclude, separated by newline'
8+
type: string
9+
required: false
10+
default: ''
511

612
# Cancels all previous workflow runs for the same branch that have not yet completed.
713
concurrency:
@@ -68,7 +74,16 @@ jobs:
6874

6975
- name: Run Linter
7076
if: steps.check_linter_file.outputs.files_exists == 'true'
71-
run: vendor/bin/parallel-lint -j 10 . --show-deprecated --exclude vendor --exclude .git --checkstyle | cs2pr
77+
run: |
78+
EXCLUDES=("--exclude vendor" "--exclude .git")
79+
80+
for i in "${ADDITIONAL_EXCLUDES[@]}"; do
81+
EXCLUDES+=("--exclude $i")
82+
done
83+
84+
vendor/bin/parallel-lint -j 10 . --show-deprecated "${EXCLUDES[@]}" --checkstyle | cs2pr
85+
env:
86+
ADDITIONAL_EXCLUDES: ${{ inputs.parallel-lint-excludes }}
7287

7388
lint-gherkin: #----------------------------------------------------------------
7489
name: Lint Gherkin Feature files

0 commit comments

Comments
 (0)