We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ac30937 commit ab3efaaCopy full SHA for ab3efaa
makefile
@@ -4,4 +4,11 @@ format:
4
@swiftformat --swiftversion 5.5 --indent 2 ./
5
6
lint:
7
- @git ls-files --exclude-standard | grep -E '\.swift$$' | swiftlint --fix --autocorrect
+ @echo "Running SwiftLint on tracked Swift files..."
8
+ @files="$$(git ls-files -- '*.swift' ':!Build/**' ':!Packages/Build/**' ':!Packages/**/.build/')"; \
9
+ if [ -z "$$files" ]; then \
10
+ echo "No Swift files tracked by git."; \
11
+ else \
12
+ printf '%s\n' "$$files" | tr '\n' '\0' | \
13
+ xargs -0 swiftlint lint --fix --autocorrect --config .swiftlint.yml --; \
14
+ fi
0 commit comments