Skip to content

Commit ab3efaa

Browse files
committed
Makefile // Update lint scripts.
1 parent ac30937 commit ab3efaa

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,11 @@ format:
44
@swiftformat --swiftversion 5.5 --indent 2 ./
55

66
lint:
7-
@git ls-files --exclude-standard | grep -E '\.swift$$' | swiftlint --fix --autocorrect
7+
@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

Comments
 (0)