Files
SwiftFormat/Sources/RuleRegistry.generated.swift
SUTHEESH SUKUMARAN 78836b9959 Replace objc string methods with swift equivalents #2292 (#2491)
Add preferSwiftStringAPI rule (#2292)

Replaces the Objective-C bridged `replacingOccurrences(of:with:)` with
Swift-native `replacing(_:with:)`. The ObjC method has known Unicode
bugs (e.g. corrupting emoji flag sequences); the Swift equivalent is
safer, shorter, and available from Swift 5.7+.

Only the two-argument form is transformed — calls with `options:` or
`range:` are left unchanged as they have no direct Swift equivalent.
2026-04-11 12:26:55 -07:00

158 lines
6.6 KiB
Swift

//
// RuleRegistry.generated.swift
// SwiftFormat
//
// Created by Cal Stephens on 7/27/24.
// Copyright © 2024 Nick Lockwood. All rights reserved.
//
/// All of the rules defined in the Rules directory.
/// **Generated automatically when running tests. Do not modify.**
let ruleRegistry: [String: FormatRule] = [
"acronyms": .acronyms,
"andOperator": .andOperator,
"anyObjectProtocol": .anyObjectProtocol,
"applicationMain": .applicationMain,
"assertionFailures": .assertionFailures,
"blankLineAfterImports": .blankLineAfterImports,
"blankLineAfterSwitchCase": .blankLineAfterSwitchCase,
"blankLinesAfterGuardStatements": .blankLinesAfterGuardStatements,
"blankLinesAroundMark": .blankLinesAroundMark,
"blankLinesAtEndOfScope": .blankLinesAtEndOfScope,
"blankLinesAtStartOfScope": .blankLinesAtStartOfScope,
"blankLinesBetweenChainedFunctions": .blankLinesBetweenChainedFunctions,
"blankLinesBetweenImports": .blankLinesBetweenImports,
"blankLinesBetweenScopes": .blankLinesBetweenScopes,
"blockComments": .blockComments,
"braces": .braces,
"conditionalAssignment": .conditionalAssignment,
"consecutiveBlankLines": .consecutiveBlankLines,
"consecutiveSpaces": .consecutiveSpaces,
"consistentSwitchCaseSpacing": .consistentSwitchCaseSpacing,
"docComments": .docComments,
"docCommentsBeforeModifiers": .docCommentsBeforeModifiers,
"duplicateImports": .duplicateImports,
"elseOnSameLine": .elseOnSameLine,
"emptyBraces": .emptyBraces,
"emptyExtensions": .emptyExtensions,
"enumNamespaces": .enumNamespaces,
"environmentEntry": .environmentEntry,
"extensionAccessControl": .extensionAccessControl,
"fileHeader": .fileHeader,
"fileMacro": .fileMacro,
"genericExtensions": .genericExtensions,
"headerFileName": .headerFileName,
"hoistAwait": .hoistAwait,
"hoistPatternLet": .hoistPatternLet,
"hoistTry": .hoistTry,
"indent": .indent,
"initCoderUnavailable": .initCoderUnavailable,
"isEmpty": .isEmpty,
"leadingDelimiters": .leadingDelimiters,
"linebreakAtEndOfFile": .linebreakAtEndOfFile,
"linebreaks": .linebreaks,
"markTypes": .markTypes,
"modifierOrder": .modifierOrder,
"modifiersOnSameLine": .modifiersOnSameLine,
"noExplicitOwnership": .noExplicitOwnership,
"noForceTryInTests": .noForceTryInTests,
"noForceUnwrapInTests": .noForceUnwrapInTests,
"noGuardInTests": .noGuardInTests,
"numberFormatting": .numberFormatting,
"opaqueGenericParameters": .opaqueGenericParameters,
"organizeDeclarations": .organizeDeclarations,
"preferCountWhere": .preferCountWhere,
"preferExplicitFalse": .preferExplicitFalse,
"preferFinalClasses": .preferFinalClasses,
"preferForLoop": .preferForLoop,
"preferKeyPath": .preferKeyPath,
"preferSwiftStringAPI": .preferSwiftStringAPI,
"preferSwiftTesting": .preferSwiftTesting,
"privateStateVariables": .privateStateVariables,
"propertyTypes": .propertyTypes,
"redundantAsync": .redundantAsync,
"redundantBackticks": .redundantBackticks,
"redundantBreak": .redundantBreak,
"redundantClosure": .redundantClosure,
"redundantEmptyView": .redundantEmptyView,
"redundantEquatable": .redundantEquatable,
"redundantExtensionACL": .redundantExtensionACL,
"redundantFileprivate": .redundantFileprivate,
"redundantGet": .redundantGet,
"redundantInit": .redundantInit,
"redundantInternal": .redundantInternal,
"redundantLet": .redundantLet,
"redundantLetError": .redundantLetError,
"redundantMemberwiseInit": .redundantMemberwiseInit,
"redundantNilInit": .redundantNilInit,
"redundantObjc": .redundantObjc,
"redundantOptionalBinding": .redundantOptionalBinding,
"redundantParens": .redundantParens,
"redundantPattern": .redundantPattern,
"redundantProperty": .redundantProperty,
"redundantPublic": .redundantPublic,
"redundantRawValues": .redundantRawValues,
"redundantReturn": .redundantReturn,
"redundantSelf": .redundantSelf,
"redundantSendable": .redundantSendable,
"redundantStaticSelf": .redundantStaticSelf,
"redundantSwiftTestingSuite": .redundantSwiftTestingSuite,
"redundantThrows": .redundantThrows,
"redundantType": .redundantType,
"redundantTypedThrows": .redundantTypedThrows,
"redundantVariable": .redundantVariable,
"redundantViewBuilder": .redundantViewBuilder,
"redundantVoidReturnType": .redundantVoidReturnType,
"semicolons": .semicolons,
"simplifyGenericConstraints": .simplifyGenericConstraints,
"singlePropertyPerLine": .singlePropertyPerLine,
"sortDeclarations": .sortDeclarations,
"sortImports": .sortImports,
"sortSwitchCases": .sortSwitchCases,
"sortTypealiases": .sortTypealiases,
"sortedImports": .sortedImports,
"sortedSwitchCases": .sortedSwitchCases,
"spaceAroundBraces": .spaceAroundBraces,
"spaceAroundBrackets": .spaceAroundBrackets,
"spaceAroundComments": .spaceAroundComments,
"spaceAroundGenerics": .spaceAroundGenerics,
"spaceAroundOperators": .spaceAroundOperators,
"spaceAroundParens": .spaceAroundParens,
"spaceInsideBraces": .spaceInsideBraces,
"spaceInsideBrackets": .spaceInsideBrackets,
"spaceInsideComments": .spaceInsideComments,
"spaceInsideGenerics": .spaceInsideGenerics,
"spaceInsideParens": .spaceInsideParens,
"specifiers": .specifiers,
"strongOutlets": .strongOutlets,
"strongifiedSelf": .strongifiedSelf,
"swiftTestingTestCaseNames": .swiftTestingTestCaseNames,
"testSuiteAccessControl": .testSuiteAccessControl,
"throwingTests": .throwingTests,
"todos": .todos,
"trailingClosures": .trailingClosures,
"trailingCommas": .trailingCommas,
"trailingSpace": .trailingSpace,
"typeSugar": .typeSugar,
"unusedArguments": .unusedArguments,
"unusedPrivateDeclarations": .unusedPrivateDeclarations,
"urlMacro": .urlMacro,
"validateTestCases": .validateTestCases,
"void": .void,
"wrap": .wrap,
"wrapArguments": .wrapArguments,
"wrapAttributes": .wrapAttributes,
"wrapCaseBodies": .wrapCaseBodies,
"wrapConditionalBodies": .wrapConditionalBodies,
"wrapEnumCases": .wrapEnumCases,
"wrapFunctionBodies": .wrapFunctionBodies,
"wrapLoopBodies": .wrapLoopBodies,
"wrapMultilineConditionalAssignment": .wrapMultilineConditionalAssignment,
"wrapMultilineFunctionChains": .wrapMultilineFunctionChains,
"wrapMultilineStatementBraces": .wrapMultilineStatementBraces,
"wrapPropertyBodies": .wrapPropertyBodies,
"wrapSingleLineComments": .wrapSingleLineComments,
"wrapSwitchCases": .wrapSwitchCases,
"yodaConditions": .yodaConditions,
]