Skip to content

Instantly share code, notes, and snippets.

@mnaruse
Created June 14, 2020 10:48
Show Gist options
  • Save mnaruse/2d3d84d78a2d823cb32d5542b8556a09 to your computer and use it in GitHub Desktop.
Save mnaruse/2d3d84d78a2d823cb32d5542b8556a09 to your computer and use it in GitHub Desktop.
My favorite ".swiftformat" file.
# file options
--exclude Pods,Generated
# format options
--allman false
--binarygrouping 4,8
--commas inline
--comments indent
--decimalgrouping 3,6
--elseposition same-line
--empty void
--exponentcase lowercase
--exponentgrouping disabled
--fractiongrouping disabled
--header ignore
--hexgrouping 4,8
--hexliteralcase uppercase
--ifdef indent
--indent 4
--indentcase false
--importgrouping testable-bottom
--linebreaks lf
--maxwidth none
--octalgrouping 4,8
--operatorfunc spaced
--patternlet hoist
--ranges spaced
--self remove
--semicolons inline
--stripunusedargs closure-only
--swiftversion 5.0
--trimwhitespace always
--wraparguments preserve
--wrapcollections preserve
--specifierorder public,override
# other format options
# rules
--enable isEmpty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment