Skip to content

Commit 4efc13a

Browse files
committed
Ask xcode to run swift-format and format recurisively.
1 parent dec5670 commit 4efc13a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

swift-format.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ if [[ -f .swiftformatignore ]]; then
2626
log "Found swiftformatignore file..."
2727

2828
log "Running swift format format..."
29-
tr '\n' '\0' < .swiftformatignore| xargs -0 -I% printf '":(exclude)%" '| xargs git ls-files -z '*.swift' | xargs -0 swift format format --parallel --in-place
29+
tr '\n' '\0' < .swiftformatignore| xargs -0 -I% printf '":(exclude)%" '| xargs git ls-files -z '*.swift' | xargs -0 xcrun swift-format --parallel --recursive --in-place
3030

3131
# log "Running swift format lint..."
3232

3333
# tr '\n' '\0' < .swiftformatignore | xargs -0 -I% printf '":(exclude)%" '| xargs git ls-files -z '*.swift' | xargs -0 swift format lint --strict --parallel
3434
else
3535
log "Running swift format format..."
36-
git ls-files -z '*.swift' | xargs -0 swift format format --parallel --in-place
36+
git ls-files -z '*.swift' | xargs -0 xcrun swift-format --parallel --recursive --in-place
3737

3838
# log "Running swift format lint..."
3939

0 commit comments

Comments
 (0)