Skip to content

Commit fd70c6f

Browse files
committed
Update quality assurance workflow to include ktlint checks
Signed-off-by: James Bradlee <[email protected]>
1 parent 7db2cfc commit fd70c6f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/quality-assurance.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ jobs:
3636
uses: ./.github/actions/setup-ktlint
3737
- run: |
3838
if [[ "${{ github.event_name }}" == "push" ]]; then
39-
git diff --name-only --relative ${{ github.event.before }} ${{ github.event.after }} -- '*.kt' '*.kts'
39+
args=$(git diff --name-only --relative ${{ github.event.before }} ${{ github.event.after }} -- '*.kt' '*.kts' | xargs printf -- '%s\n' | tr '\n' ' ')
4040
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
4141
args=$(gh pr diff --name-only ${{ github.event.number }} | grep -E "\.kts?$" | xargs printf -- '%s\n' | tr '\n' ' ')
42+
fi
43+
if [[ -n "$args" ]]; then
4244
ktlint --relative $args
4345
fi
4446
env:

0 commit comments

Comments
 (0)