Skip to content

Commit 505456a

Browse files
committed
chore: SwiftLint 파일 실행 방식 개선
1 parent 8bcd147 commit 505456a

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

Tuist/ProjectDescriptionHelpers/Project+Packages.swift

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,16 @@ public enum DevLogScripts {
8080
if [ "$sourcePathName" != "." ]; then
8181
"$swiftLintPath" lint --config "$configPath" "$lintSourcePath"
8282
else
83-
status=0
84-
while IFS= read -r swiftFilePath; do
85-
"$swiftLintPath" lint --config "$configPath" "$swiftFilePath" || status=$?
86-
done < <(find "$lintSourcePath" -name "*.swift" -not -path "*/Derived/*" -not -name "Project.swift")
87-
exit "$status"
83+
swiftFilePaths=()
84+
while IFS= read -r -d '' swiftFilePath; do
85+
swiftFilePaths+=("$swiftFilePath")
86+
done < <(find "$lintSourcePath" -name "*.swift" -not -path "*/Derived/*" -not -name "Project.swift" -print0)
87+
88+
if [ ${#swiftFilePaths[@]} -lt 1 ]; then
89+
exit 0
90+
fi
91+
92+
"$swiftLintPath" lint --config "$configPath" "${swiftFilePaths[@]}"
8893
fi
8994
""",
9095
name: "SwiftLint",

0 commit comments

Comments
 (0)