Skip to content

Commit e688727

Browse files
add swiftlint in github actions
1 parent 31b592e commit e688727

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/swiftlint.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: SwiftLint
2+
3+
on:
4+
push:
5+
branches:
6+
- '**' # Run on all branches
7+
pull_request:
8+
branches:
9+
- '**' # Run on all branches for PRs
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest # Use the latest Linux environment
14+
15+
steps:
16+
# Step 1: Check out the repository
17+
- name: Checkout repository
18+
uses: actions/checkout@v3
19+
20+
# Step 2: Run SwiftLint and parse errors
21+
- name: Lint
22+
run: |
23+
set -o pipefail
24+
swiftlint lint --strict --quiet | sed -E 's/^(.*):([0-9]+):([0-9]+): (warning|error|[^:]+): (.*)/::\4 title=Lint error,file=\1,line=\2,col=\3::\5\n\1:\2:\3/'

0 commit comments

Comments
 (0)