🛠️
swift-format の Configuration 【仕分け編】
Formatに影響があるもの
- lineLength
- indentation
- tabWidth
- maximumBlankLines
- respectsExistingLineBreaks
- lineBreakBeforeControlFlowKeywords
- lineBreakBeforeEachArgument
- lineBreakBeforeEachGenericRequirement
- prioritizeKeepingFunctionOutputTogether
- indentConditionalCompilationBlocks
- lineBreakAroundMultilineExpressionChainComponents
- indentSwitchCaseLabels
- fileScopedDeclarationPrivacy
- rules
- DoNotUseSemicolons
- FileScopedDeclarationPrivacy
- FullyIndirectEnum
- GroupNumericLiterals
- NoAccessLevelOnExtensionDeclaration
- NoCasesWithOnlyFallthrough
- NoEmptyTrailingClosureParentheses
- NoLabelsInCasePatterns
- NoParensAroundConditions
- NoVoidReturnOnFunctionSignature
- OneCasePerLine
- OneVariableDeclarationPerLine
- OrderedImports
- ReturnVoidInsteadOfEmptyTuple
- UseShorthandTypeNames
- UseSingleLinePropertyGetter
- UseTripleSlashForDocumentationComments
Lintにのみ影響があるもの
- rules
- AllPublicDeclarationsHaveDocumentation
- AlwaysUseLowerCamelCase
- AmbiguousTrailingClosureOverload
- BeginDocumentationCommentWithOneLineSummary
- DontRepeatTypeInStaticProperties
- IdentifiersMustBeASCII
- NeverForceUnwrap
- NeverUseForceTry
- NeverUseImplicitlyUnwrappedOptionals
- NoBlockComments
- NoLeadingUnderscores
- OnlyOneTrailingClosureArgument
- UseLetInEveryBoundCaseVariable
- UseSynthesizedInitializer
- ValidateDocumentationComments
Discussion