create swiftformat config

This commit is contained in:
Yonas Kolb 2019-01-28 22:18:27 +11:00
parent 2b89481362
commit ac3ba77d07
2 changed files with 5 additions and 2 deletions

4
.swiftformat Normal file
View File

@ -0,0 +1,4 @@
--exclude .build
--disable sortedImports,blankLinesAtStartOfScope,blankLinesAtEndOfScope,unusedArguments,hoistPatternLet,numberFormatting,redundantRawValues,andOperator
--ifdef noindent
--ranges nospace

View File

@ -26,8 +26,7 @@ uninstall:
rm -rf $(SHARE_PATH)
format_code:
swiftformat Tests --wraparguments beforefirst --stripunusedargs closure-only --header strip --disable blankLinesAtStartOfScope
swiftformat Sources --wraparguments beforefirst --stripunusedargs closure-only --header strip --disable blankLinesAtStartOfScope
swiftformat .
release: format_code
sed -i '' 's|\(let version = try Version("\)\(.*\)\(")\)|\1$(VERSION)\3|' Sources/XcodeGen/main.swift