Created
January 19, 2024 07:59
-
-
Save bocato/8be8444f77a1bc6f2d0015c9bea0f441 to your computer and use it in GitHub Desktop.
swiftformat.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# General Options | |
--swiftversion 5.7 | |
# File Options | |
--exclude **.generated.swift, **.testing.swift ## use this to exclude whatever you need, in my case I have all generated files and testing utils with the extensions presented here. | |
# Format Options | |
--allman false | |
--binarygrouping none | |
--closingparen balanced | |
--commas always | |
--conflictmarkers reject | |
--decimalgrouping none | |
--elseposition same-line | |
--exponentcase lowercase | |
--exponentgrouping disabled | |
--fractiongrouping disabled | |
--fragment false | |
--header strip | |
--hexgrouping none | |
--hexliteralcase lowercase | |
--ifdef no-indent | |
--importgrouping alphabetized | |
--indent 4 | |
--indentcase false | |
# Below here we need to be sure it matches .swiftlint file. | |
--maxwidth 180 | |
--nospaceoperators ..<,... | |
--octalgrouping none | |
--operatorfunc no-space | |
--stripunusedargs closure-only | |
--wraparguments before-first | |
--wrapcollections before-first | |
--wrapparameters before-first | |
# Explicitly Enabled Rules | |
--enable docComments | |
--enable --selfrequired | |
--enable strongifiedSelf | |
--enable trailingclosures | |
# Disabled Rules | |
--disable linebreakAtEndOfFile | |
--disable hoistAwait | |
--disable wrapMultilineStatementBraces | |
--disable extensionAccessControl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment