diff --git a/Package.swift b/Package.swift index 2c5540744..5aafc2f16 100644 --- a/Package.swift +++ b/Package.swift @@ -14,6 +14,22 @@ import Foundation import PackageDescription +// FIXME: The `generate-pipeline-plugin` doesn't appear to be executing correctly during the build +// on Windows. To work around this for the time being, we check in the generated files and don't +// run the plugin there, but continue to run the plugin on other platforms and exclue the generated +// files from the build. +#if os(Windows) + let swiftFormatExclusions: [String] = [] + let swiftFormatConfigurationExclusions: [String] = [] + let swiftFormatRulesExclusions: [String] = [] + let pluginsToRun: [Target.PluginUsage] = [] +#else + let swiftFormatExclusions: [String] = ["Pipelines+Generated.swift"] + let swiftFormatConfigurationExclusions: [String] = ["RuleRegistry+Generated.swift"] + let swiftFormatRulesExclusions: [String] = ["RuleNameCache+Generated.swift"] + let pluginsToRun: [Target.PluginUsage] = ["generate-pipeline-plugin"] +#endif + let package = Package( name: "swift-format", platforms: [ @@ -49,11 +65,13 @@ let package = Package( .product(name: "SwiftOperators", package: "swift-syntax"), .product(name: "SwiftParser", package: "swift-syntax"), ], - plugins: ["generate-pipeline-plugin"] + exclude: swiftFormatExclusions, + plugins: pluginsToRun ), .target( name: "SwiftFormatConfiguration", - plugins: ["generate-pipeline-plugin"] + exclude: swiftFormatConfigurationExclusions, + plugins: pluginsToRun ), .target( name: "SwiftFormatCore", @@ -66,7 +84,8 @@ let package = Package( .target( name: "SwiftFormatRules", dependencies: ["SwiftFormatCore", "SwiftFormatConfiguration"], - plugins: ["generate-pipeline-plugin"] + exclude: swiftFormatRulesExclusions, + plugins: pluginsToRun ), .target( name: "SwiftFormatPrettyPrint", diff --git a/Scripts/generate-all-pipelines.sh b/Scripts/generate-all-pipelines.sh new file mode 100755 index 000000000..4df1056d8 --- /dev/null +++ b/Scripts/generate-all-pipelines.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +# +# This script is used to manually generate sources otherwise generated by the +# `generate-pipeline-plugin` build tool, until that tool is working in Windows +# builds. The generated sources will be ignored when building on non-Windows +# platforms. + +SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)" +PACKAGE_DIR="$(dirname -- "${SCRIPT_DIR}")" +SOURCES_DIR="${PACKAGE_DIR}/Sources" + +echo "*** Generating ${SOURCES_DIR}/SwiftFormat/Pipelines+Generated.swift..." + +swift run --package-path "${PACKAGE_DIR}" generate-pipeline \ + --sources-directory "${SOURCES_DIR}" \ + --output-file "${SOURCES_DIR}/SwiftFormat/Pipelines+Generated.swift" \ + --target SwiftFormat + +echo "*** Generating ${SOURCES_DIR}/SwiftFormatConfiguration/RuleRegistry+Generated.swift..." + +swift run --package-path "${PACKAGE_DIR}" generate-pipeline \ + --sources-directory "${SOURCES_DIR}" \ + --output-file "${SOURCES_DIR}/SwiftFormatConfiguration/RuleRegistry+Generated.swift" \ + --target SwiftFormatConfiguration + +echo "*** Generating ${SOURCES_DIR}/SwiftFormatRules/RuleNameCache+Generated.swift..." + +swift run --package-path "${PACKAGE_DIR}" generate-pipeline \ + --sources-directory "${SOURCES_DIR}" \ + --output-file "${SOURCES_DIR}/SwiftFormatRules/RuleNameCache+Generated.swift" \ + --target SwiftFormatRules + +echo "*** Done!" diff --git a/Sources/SwiftFormat/Pipelines+Generated.swift b/Sources/SwiftFormat/Pipelines+Generated.swift new file mode 100644 index 000000000..f2e9f8f72 --- /dev/null +++ b/Sources/SwiftFormat/Pipelines+Generated.swift @@ -0,0 +1,331 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + +// This file is automatically generated with generate-pipeline. Do Not Edit! + +import SwiftFormatCore +import SwiftFormatRules +import SwiftSyntax + +/// A syntax visitor that delegates to individual rules for linting. +/// +/// This file will be extended with `visit` methods in Pipelines+Generated.swift. +class LintPipeline: SyntaxVisitor { + + /// The formatter context. + let context: Context + + /// Stores lint and format rule instances, indexed by the `ObjectIdentifier` of a rule's + /// class type. + var ruleCache = [ObjectIdentifier: Rule]() + + /// Creates a new lint pipeline. + init(context: Context) { + self.context = context + super.init(viewMode: .sourceAccurate) + } + + override func visit(_ node: AsExprSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(NeverForceUnwrap.visit, for: node) + return .visitChildren + } + + override func visit(_ node: AssociatedtypeDeclSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(BeginDocumentationCommentWithOneLineSummary.visit, for: node) + visitIfEnabled(NoLeadingUnderscores.visit, for: node) + return .visitChildren + } + + override func visit(_ node: ClassDeclSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(AllPublicDeclarationsHaveDocumentation.visit, for: node) + visitIfEnabled(AlwaysUseLowerCamelCase.visit, for: node) + visitIfEnabled(BeginDocumentationCommentWithOneLineSummary.visit, for: node) + visitIfEnabled(DontRepeatTypeInStaticProperties.visit, for: node) + visitIfEnabled(NoLeadingUnderscores.visit, for: node) + visitIfEnabled(UseTripleSlashForDocumentationComments.visit, for: node) + return .visitChildren + } + + override func visit(_ node: ClosureSignatureSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(AlwaysUseLowerCamelCase.visit, for: node) + visitIfEnabled(ReturnVoidInsteadOfEmptyTuple.visit, for: node) + return .visitChildren + } + + override func visit(_ node: CodeBlockItemListSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(DoNotUseSemicolons.visit, for: node) + visitIfEnabled(OneVariableDeclarationPerLine.visit, for: node) + visitIfEnabled(UseEarlyExits.visit, for: node) + return .visitChildren + } + + override func visit(_ node: CodeBlockSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(AmbiguousTrailingClosureOverload.visit, for: node) + return .visitChildren + } + + override func visit(_ node: ConditionElementSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(NoParensAroundConditions.visit, for: node) + return .visitChildren + } + + override func visit(_ node: DeinitializerDeclSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(AllPublicDeclarationsHaveDocumentation.visit, for: node) + visitIfEnabled(BeginDocumentationCommentWithOneLineSummary.visit, for: node) + visitIfEnabled(UseTripleSlashForDocumentationComments.visit, for: node) + return .visitChildren + } + + override func visit(_ node: EnumCaseElementSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(AlwaysUseLowerCamelCase.visit, for: node) + visitIfEnabled(NoLeadingUnderscores.visit, for: node) + return .visitChildren + } + + override func visit(_ node: EnumDeclSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(BeginDocumentationCommentWithOneLineSummary.visit, for: node) + visitIfEnabled(DontRepeatTypeInStaticProperties.visit, for: node) + visitIfEnabled(FullyIndirectEnum.visit, for: node) + visitIfEnabled(NoLeadingUnderscores.visit, for: node) + visitIfEnabled(OneCasePerLine.visit, for: node) + visitIfEnabled(UseTripleSlashForDocumentationComments.visit, for: node) + return .visitChildren + } + + override func visit(_ node: ExtensionDeclSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(DontRepeatTypeInStaticProperties.visit, for: node) + visitIfEnabled(NoAccessLevelOnExtensionDeclaration.visit, for: node) + visitIfEnabled(UseTripleSlashForDocumentationComments.visit, for: node) + return .visitChildren + } + + override func visit(_ node: ForInStmtSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(UseWhereClausesInForLoops.visit, for: node) + return .visitChildren + } + + override func visit(_ node: ForcedValueExprSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(NeverForceUnwrap.visit, for: node) + return .visitChildren + } + + override func visit(_ node: FunctionCallExprSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(NoEmptyTrailingClosureParentheses.visit, for: node) + visitIfEnabled(OnlyOneTrailingClosureArgument.visit, for: node) + return .visitChildren + } + + override func visit(_ node: FunctionDeclSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(AllPublicDeclarationsHaveDocumentation.visit, for: node) + visitIfEnabled(AlwaysUseLowerCamelCase.visit, for: node) + visitIfEnabled(BeginDocumentationCommentWithOneLineSummary.visit, for: node) + visitIfEnabled(NoLeadingUnderscores.visit, for: node) + visitIfEnabled(UseTripleSlashForDocumentationComments.visit, for: node) + visitIfEnabled(ValidateDocumentationComments.visit, for: node) + return .visitChildren + } + + override func visit(_ node: FunctionParameterSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(NoLeadingUnderscores.visit, for: node) + return .visitChildren + } + + override func visit(_ node: FunctionSignatureSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(NoVoidReturnOnFunctionSignature.visit, for: node) + return .visitChildren + } + + override func visit(_ node: FunctionTypeSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(ReturnVoidInsteadOfEmptyTuple.visit, for: node) + return .visitChildren + } + + override func visit(_ node: GenericParameterSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(NoLeadingUnderscores.visit, for: node) + return .visitChildren + } + + override func visit(_ node: IdentifierPatternSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(IdentifiersMustBeASCII.visit, for: node) + visitIfEnabled(NoLeadingUnderscores.visit, for: node) + return .visitChildren + } + + override func visit(_ node: IfStmtSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(NoParensAroundConditions.visit, for: node) + return .visitChildren + } + + override func visit(_ node: InitializerDeclSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(AllPublicDeclarationsHaveDocumentation.visit, for: node) + visitIfEnabled(BeginDocumentationCommentWithOneLineSummary.visit, for: node) + visitIfEnabled(UseTripleSlashForDocumentationComments.visit, for: node) + visitIfEnabled(ValidateDocumentationComments.visit, for: node) + return .visitChildren + } + + override func visit(_ node: IntegerLiteralExprSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(GroupNumericLiterals.visit, for: node) + return .visitChildren + } + + override func visit(_ node: MemberDeclBlockSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(AmbiguousTrailingClosureOverload.visit, for: node) + return .visitChildren + } + + override func visit(_ node: MemberDeclListSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(DoNotUseSemicolons.visit, for: node) + return .visitChildren + } + + override func visit(_ node: OptionalBindingConditionSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(AlwaysUseLowerCamelCase.visit, for: node) + return .visitChildren + } + + override func visit(_ node: PatternBindingSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(UseSingleLinePropertyGetter.visit, for: node) + return .visitChildren + } + + override func visit(_ node: PrecedenceGroupDeclSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(NoLeadingUnderscores.visit, for: node) + return .visitChildren + } + + override func visit(_ node: ProtocolDeclSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(AllPublicDeclarationsHaveDocumentation.visit, for: node) + visitIfEnabled(BeginDocumentationCommentWithOneLineSummary.visit, for: node) + visitIfEnabled(DontRepeatTypeInStaticProperties.visit, for: node) + visitIfEnabled(NoLeadingUnderscores.visit, for: node) + visitIfEnabled(UseTripleSlashForDocumentationComments.visit, for: node) + return .visitChildren + } + + override func visit(_ node: RepeatWhileStmtSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(NoParensAroundConditions.visit, for: node) + return .visitChildren + } + + override func visit(_ node: SimpleTypeIdentifierSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(UseShorthandTypeNames.visit, for: node) + return .visitChildren + } + + override func visit(_ node: SourceFileSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(AlwaysUseLowerCamelCase.visit, for: node) + visitIfEnabled(AmbiguousTrailingClosureOverload.visit, for: node) + visitIfEnabled(FileScopedDeclarationPrivacy.visit, for: node) + visitIfEnabled(NeverForceUnwrap.visit, for: node) + visitIfEnabled(NeverUseForceTry.visit, for: node) + visitIfEnabled(NeverUseImplicitlyUnwrappedOptionals.visit, for: node) + visitIfEnabled(OrderedImports.visit, for: node) + return .visitChildren + } + + override func visit(_ node: SpecializeExprSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(UseShorthandTypeNames.visit, for: node) + return .visitChildren + } + + override func visit(_ node: StructDeclSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(AllPublicDeclarationsHaveDocumentation.visit, for: node) + visitIfEnabled(BeginDocumentationCommentWithOneLineSummary.visit, for: node) + visitIfEnabled(DontRepeatTypeInStaticProperties.visit, for: node) + visitIfEnabled(NoLeadingUnderscores.visit, for: node) + visitIfEnabled(UseSynthesizedInitializer.visit, for: node) + visitIfEnabled(UseTripleSlashForDocumentationComments.visit, for: node) + return .visitChildren + } + + override func visit(_ node: SubscriptDeclSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(AllPublicDeclarationsHaveDocumentation.visit, for: node) + visitIfEnabled(BeginDocumentationCommentWithOneLineSummary.visit, for: node) + visitIfEnabled(UseTripleSlashForDocumentationComments.visit, for: node) + return .visitChildren + } + + override func visit(_ node: SwitchCaseLabelSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(NoLabelsInCasePatterns.visit, for: node) + return .visitChildren + } + + override func visit(_ node: SwitchCaseListSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(NoCasesWithOnlyFallthrough.visit, for: node) + return .visitChildren + } + + override func visit(_ node: SwitchStmtSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(NoParensAroundConditions.visit, for: node) + return .visitChildren + } + + override func visit(_ node: TokenSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(NoBlockComments.visit, for: node) + return .visitChildren + } + + override func visit(_ node: TryExprSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(NeverUseForceTry.visit, for: node) + return .visitChildren + } + + override func visit(_ node: TypealiasDeclSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(AllPublicDeclarationsHaveDocumentation.visit, for: node) + visitIfEnabled(BeginDocumentationCommentWithOneLineSummary.visit, for: node) + visitIfEnabled(NoLeadingUnderscores.visit, for: node) + visitIfEnabled(UseTripleSlashForDocumentationComments.visit, for: node) + return .visitChildren + } + + override func visit(_ node: ValueBindingPatternSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(UseLetInEveryBoundCaseVariable.visit, for: node) + return .visitChildren + } + + override func visit(_ node: VariableDeclSyntax) -> SyntaxVisitorContinueKind { + visitIfEnabled(AllPublicDeclarationsHaveDocumentation.visit, for: node) + visitIfEnabled(AlwaysUseLowerCamelCase.visit, for: node) + visitIfEnabled(BeginDocumentationCommentWithOneLineSummary.visit, for: node) + visitIfEnabled(NeverUseImplicitlyUnwrappedOptionals.visit, for: node) + visitIfEnabled(UseTripleSlashForDocumentationComments.visit, for: node) + return .visitChildren + } +} + +extension FormatPipeline { + + func visit(_ node: Syntax) -> Syntax { + var node = node + node = DoNotUseSemicolons(context: context).visit(node) + node = FileScopedDeclarationPrivacy(context: context).visit(node) + node = FullyIndirectEnum(context: context).visit(node) + node = GroupNumericLiterals(context: context).visit(node) + node = NoAccessLevelOnExtensionDeclaration(context: context).visit(node) + node = NoCasesWithOnlyFallthrough(context: context).visit(node) + node = NoEmptyTrailingClosureParentheses(context: context).visit(node) + node = NoLabelsInCasePatterns(context: context).visit(node) + node = NoParensAroundConditions(context: context).visit(node) + node = NoVoidReturnOnFunctionSignature(context: context).visit(node) + node = OneCasePerLine(context: context).visit(node) + node = OneVariableDeclarationPerLine(context: context).visit(node) + node = OrderedImports(context: context).visit(node) + node = ReturnVoidInsteadOfEmptyTuple(context: context).visit(node) + node = UseEarlyExits(context: context).visit(node) + node = UseShorthandTypeNames(context: context).visit(node) + node = UseSingleLinePropertyGetter(context: context).visit(node) + node = UseTripleSlashForDocumentationComments(context: context).visit(node) + node = UseWhereClausesInForLoops(context: context).visit(node) + return node + } +} diff --git a/Sources/SwiftFormatConfiguration/RuleRegistry+Generated.swift b/Sources/SwiftFormatConfiguration/RuleRegistry+Generated.swift new file mode 100644 index 000000000..776990d1e --- /dev/null +++ b/Sources/SwiftFormatConfiguration/RuleRegistry+Generated.swift @@ -0,0 +1,52 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + +// This file is automatically generated with generate-pipeline. Do Not Edit! + +enum RuleRegistry { + static let rules: [String: Bool] = [ + "AllPublicDeclarationsHaveDocumentation": false, + "AlwaysUseLowerCamelCase": true, + "AmbiguousTrailingClosureOverload": true, + "BeginDocumentationCommentWithOneLineSummary": false, + "DoNotUseSemicolons": true, + "DontRepeatTypeInStaticProperties": true, + "FileScopedDeclarationPrivacy": true, + "FullyIndirectEnum": true, + "GroupNumericLiterals": true, + "IdentifiersMustBeASCII": true, + "NeverForceUnwrap": false, + "NeverUseForceTry": false, + "NeverUseImplicitlyUnwrappedOptionals": false, + "NoAccessLevelOnExtensionDeclaration": true, + "NoBlockComments": true, + "NoCasesWithOnlyFallthrough": true, + "NoEmptyTrailingClosureParentheses": true, + "NoLabelsInCasePatterns": true, + "NoLeadingUnderscores": false, + "NoParensAroundConditions": true, + "NoVoidReturnOnFunctionSignature": true, + "OneCasePerLine": true, + "OneVariableDeclarationPerLine": true, + "OnlyOneTrailingClosureArgument": true, + "OrderedImports": true, + "ReturnVoidInsteadOfEmptyTuple": true, + "UseEarlyExits": false, + "UseLetInEveryBoundCaseVariable": true, + "UseShorthandTypeNames": true, + "UseSingleLinePropertyGetter": true, + "UseSynthesizedInitializer": true, + "UseTripleSlashForDocumentationComments": true, + "UseWhereClausesInForLoops": false, + "ValidateDocumentationComments": false, + ] +} diff --git a/Sources/SwiftFormatRules/RuleNameCache+Generated.swift b/Sources/SwiftFormatRules/RuleNameCache+Generated.swift new file mode 100644 index 000000000..56f5c3a12 --- /dev/null +++ b/Sources/SwiftFormatRules/RuleNameCache+Generated.swift @@ -0,0 +1,51 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + +// This file is automatically generated with generate-pipeline. Do Not Edit! + +/// By default, the `Rule.ruleName` should be the name of the implementing rule type. +public let ruleNameCache: [ObjectIdentifier: String] = [ + ObjectIdentifier(AllPublicDeclarationsHaveDocumentation.self): "AllPublicDeclarationsHaveDocumentation", + ObjectIdentifier(AlwaysUseLowerCamelCase.self): "AlwaysUseLowerCamelCase", + ObjectIdentifier(AmbiguousTrailingClosureOverload.self): "AmbiguousTrailingClosureOverload", + ObjectIdentifier(BeginDocumentationCommentWithOneLineSummary.self): "BeginDocumentationCommentWithOneLineSummary", + ObjectIdentifier(DoNotUseSemicolons.self): "DoNotUseSemicolons", + ObjectIdentifier(DontRepeatTypeInStaticProperties.self): "DontRepeatTypeInStaticProperties", + ObjectIdentifier(FileScopedDeclarationPrivacy.self): "FileScopedDeclarationPrivacy", + ObjectIdentifier(FullyIndirectEnum.self): "FullyIndirectEnum", + ObjectIdentifier(GroupNumericLiterals.self): "GroupNumericLiterals", + ObjectIdentifier(IdentifiersMustBeASCII.self): "IdentifiersMustBeASCII", + ObjectIdentifier(NeverForceUnwrap.self): "NeverForceUnwrap", + ObjectIdentifier(NeverUseForceTry.self): "NeverUseForceTry", + ObjectIdentifier(NeverUseImplicitlyUnwrappedOptionals.self): "NeverUseImplicitlyUnwrappedOptionals", + ObjectIdentifier(NoAccessLevelOnExtensionDeclaration.self): "NoAccessLevelOnExtensionDeclaration", + ObjectIdentifier(NoBlockComments.self): "NoBlockComments", + ObjectIdentifier(NoCasesWithOnlyFallthrough.self): "NoCasesWithOnlyFallthrough", + ObjectIdentifier(NoEmptyTrailingClosureParentheses.self): "NoEmptyTrailingClosureParentheses", + ObjectIdentifier(NoLabelsInCasePatterns.self): "NoLabelsInCasePatterns", + ObjectIdentifier(NoLeadingUnderscores.self): "NoLeadingUnderscores", + ObjectIdentifier(NoParensAroundConditions.self): "NoParensAroundConditions", + ObjectIdentifier(NoVoidReturnOnFunctionSignature.self): "NoVoidReturnOnFunctionSignature", + ObjectIdentifier(OneCasePerLine.self): "OneCasePerLine", + ObjectIdentifier(OneVariableDeclarationPerLine.self): "OneVariableDeclarationPerLine", + ObjectIdentifier(OnlyOneTrailingClosureArgument.self): "OnlyOneTrailingClosureArgument", + ObjectIdentifier(OrderedImports.self): "OrderedImports", + ObjectIdentifier(ReturnVoidInsteadOfEmptyTuple.self): "ReturnVoidInsteadOfEmptyTuple", + ObjectIdentifier(UseEarlyExits.self): "UseEarlyExits", + ObjectIdentifier(UseLetInEveryBoundCaseVariable.self): "UseLetInEveryBoundCaseVariable", + ObjectIdentifier(UseShorthandTypeNames.self): "UseShorthandTypeNames", + ObjectIdentifier(UseSingleLinePropertyGetter.self): "UseSingleLinePropertyGetter", + ObjectIdentifier(UseSynthesizedInitializer.self): "UseSynthesizedInitializer", + ObjectIdentifier(UseTripleSlashForDocumentationComments.self): "UseTripleSlashForDocumentationComments", + ObjectIdentifier(UseWhereClausesInForLoops.self): "UseWhereClausesInForLoops", + ObjectIdentifier(ValidateDocumentationComments.self): "ValidateDocumentationComments", +]