Apply consistent capitalization to rule names (#3938)

This commit is contained in:
Danny Mösch 2022-12-26 09:32:36 +01:00 committed by GitHub
parent 58611e6718
commit 5ff40867b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 22 additions and 22 deletions

View File

@ -11,7 +11,7 @@ struct FileNameNoSpaceRule: ConfigurationProviderRule, OptInRule, SourceKitFreeR
static let description = RuleDescription(
identifier: "file_name_no_space",
name: "File Name No Space",
name: "File Name no Space",
description: "File name should not contain any whitespace.",
kind: .idiomatic
)

View File

@ -7,7 +7,7 @@ struct ForWhereRule: SwiftSyntaxRule, ConfigurationProviderRule {
static let description = RuleDescription(
identifier: "for_where",
name: "For Where",
name: "Prefer For-Where",
description: "`where` clauses are preferred over a single `if` inside a `for`.",
kind: .idiomatic,
nonTriggeringExamples: [

View File

@ -7,7 +7,7 @@ struct NoFallthroughOnlyRule: SwiftSyntaxRule, ConfigurationProviderRule {
static let description = RuleDescription(
identifier: "no_fallthrough_only",
name: "No Fallthrough Only",
name: "No Fallthrough only",
description: "Fallthroughs can only be used if the `case` contains at least one other statement.",
kind: .idiomatic,
nonTriggeringExamples: NoFallthroughOnlyRuleExamples.nonTriggeringExamples,

View File

@ -7,7 +7,7 @@ struct PrivateOverFilePrivateRule: ConfigurationProviderRule, SwiftSyntaxCorrect
static let description = RuleDescription(
identifier: "private_over_fileprivate",
name: "Private over fileprivate",
name: "Private over Fileprivate",
description: "Prefer `private` over `fileprivate` declarations.",
kind: .idiomatic,
nonTriggeringExamples: [

View File

@ -7,7 +7,7 @@ struct RedundantSetAccessControlRule: ConfigurationProviderRule, SwiftSyntaxRule
static let description = RuleDescription(
identifier: "redundant_set_access_control",
name: "Redundant Set Access Control Rule",
name: "Redundant Access Control for Setter",
description: "Property setter access level shouldn't be explicit if " +
"it's the same as the variable access level.",
kind: .idiomatic,

View File

@ -7,7 +7,7 @@ struct StrictFilePrivateRule: OptInRule, ConfigurationProviderRule, SwiftSyntaxR
static let description = RuleDescription(
identifier: "strict_fileprivate",
name: "Strict fileprivate",
name: "Strict Fileprivate",
description: "`fileprivate` should be avoided.",
kind: .idiomatic,
nonTriggeringExamples: [

View File

@ -7,7 +7,7 @@ struct BalancedXCTestLifecycleRule: SwiftSyntaxRule, OptInRule, ConfigurationPro
static let description = RuleDescription(
identifier: "balanced_xctest_lifecycle",
name: "Balanced XCTest life-cycle",
name: "Balanced XCTest Life Cycle",
description: "Test classes must implement balanced setUp and tearDown methods.",
kind: .lint,
nonTriggeringExamples: [

View File

@ -7,7 +7,7 @@ struct LowerACLThanParentRule: OptInRule, ConfigurationProviderRule, SwiftSyntax
static let description = RuleDescription(
identifier: "lower_acl_than_parent",
name: "Lower ACL than parent",
name: "Lower ACL than Parent",
description: "Ensure declarations have a lower access control level than their enclosing parent",
kind: .lint,
nonTriggeringExamples: [

View File

@ -7,7 +7,7 @@ struct OverriddenSuperCallRule: ConfigurationProviderRule, SwiftSyntaxRule, OptI
static let description = RuleDescription(
identifier: "overridden_super_call",
name: "Overridden methods call super",
name: "Overridden Method Calls Super",
description: "Some overridden methods should always call super",
kind: .lint,
nonTriggeringExamples: [

View File

@ -7,7 +7,7 @@ struct ProhibitedSuperRule: ConfigurationProviderRule, SwiftSyntaxRule, OptInRul
static let description = RuleDescription(
identifier: "prohibited_super_call",
name: "Prohibited calls to super",
name: "Prohibited Calls to Super",
description: "Some methods should not call super",
kind: .lint,
nonTriggeringExamples: [

View File

@ -7,7 +7,7 @@ struct RawValueForCamelCasedCodableEnumRule: SwiftSyntaxRule, OptInRule, Configu
static let description = RuleDescription(
identifier: "raw_value_for_camel_cased_codable_enum",
name: "Raw Value For Camel Cased Codable Enum",
name: "Raw Value for Camel Cased Codable Enum",
description: "Camel cased cases of Codable String enums should have raw value.",
kind: .lint,
nonTriggeringExamples: [

View File

@ -9,7 +9,7 @@ struct TestCaseAccessibilityRule: SwiftSyntaxRule, OptInRule,
static let description = RuleDescription(
identifier: "test_case_accessibility",
name: "Test case accessibility",
name: "Test Case Accessibility",
description: "Test cases should only contain private non-test members.",
kind: .lint,
nonTriggeringExamples: TestCaseAccessibilityRuleExamples.nonTriggeringExamples,

View File

@ -7,7 +7,7 @@ struct YodaConditionRule: OptInRule, ConfigurationProviderRule, SwiftSyntaxRule
static let description = RuleDescription(
identifier: "yoda_condition",
name: "Yoda condition rule",
name: "Yoda Condition",
description: "The constant literal should be placed on the right-hand side of the comparison operator.",
kind: .lint,
nonTriggeringExamples: [

View File

@ -7,7 +7,7 @@ struct ContainsOverFilterCountRule: SwiftSyntaxRule, OptInRule, ConfigurationPro
static let description = RuleDescription(
identifier: "contains_over_filter_count",
name: "Contains Over Filter Count",
name: "Contains over Filter Count",
description: "Prefer `contains` over comparing `filter(where:).count` to 0.",
kind: .performance,
nonTriggeringExamples: [">", "==", "!="].flatMap { operation in

View File

@ -7,7 +7,7 @@ struct ContainsOverFilterIsEmptyRule: SwiftSyntaxRule, OptInRule, ConfigurationP
static let description = RuleDescription(
identifier: "contains_over_filter_is_empty",
name: "Contains Over Filter Is Empty",
name: "Contains over Filter is Empty",
description: "Prefer `contains` over using `filter(where:).isEmpty`",
kind: .performance,
nonTriggeringExamples: [">", "==", "!="].flatMap { operation in

View File

@ -7,7 +7,7 @@ struct ContainsOverFirstNotNilRule: SwiftSyntaxRule, OptInRule, ConfigurationPro
static let description = RuleDescription(
identifier: "contains_over_first_not_nil",
name: "Contains over first not nil",
name: "Contains over First not Nil",
description: "Prefer `contains` over `first(where:) != nil` and `firstIndex(where:) != nil`.",
kind: .performance,
nonTriggeringExamples: ["first", "firstIndex"].flatMap { method in

View File

@ -7,7 +7,7 @@ struct ContainsOverRangeNilComparisonRule: SwiftSyntaxRule, OptInRule, Configura
static let description = RuleDescription(
identifier: "contains_over_range_nil_comparison",
name: "Contains over range(of:) comparison to nil",
name: "Contains over Range Comparision to Nil",
description: "Prefer `contains` over `range(of:) != nil` and `range(of:) == nil`.",
kind: .performance,
nonTriggeringExamples: [

View File

@ -7,7 +7,7 @@ struct FlatMapOverMapReduceRule: SwiftSyntaxRule, OptInRule, ConfigurationProvid
static let description = RuleDescription(
identifier: "flatmap_over_map_reduce",
name: "FlatMap over map and reduce",
name: "Flat Map over Map Reduce",
description: "Prefer `flatMap` over `map` followed by `reduce([], +)`.",
kind: .performance,
nonTriggeringExamples: [

View File

@ -7,7 +7,7 @@ struct ReduceIntoRule: SwiftSyntaxRule, ConfigurationProviderRule, OptInRule {
static var description = RuleDescription(
identifier: "reduce_into",
name: "Reduce Into",
name: "Reduce into",
description: "Prefer `reduce(into:_:)` over `reduce(_:_:)` for copy-on-write types",
kind: .performance,
nonTriggeringExamples: [

View File

@ -15,7 +15,7 @@ struct SwitchCaseOnNewlineRule: SwiftSyntaxRule, ConfigurationProviderRule, OptI
static let description = RuleDescription(
identifier: "switch_case_on_newline",
name: "Switch Case on Newline",
name: "Cases on Newline",
description: "Cases inside a switch should always be on a newline",
kind: .style,
nonTriggeringExamples: [

View File

@ -7,7 +7,7 @@ struct VerticalParameterAlignmentOnCallRule: ASTRule, ConfigurationProviderRule,
static let description = RuleDescription(
identifier: "vertical_parameter_alignment_on_call",
name: "Vertical Parameter Alignment On Call",
name: "Vertical Parameter Alignment on Call",
description: "Function parameters should be aligned vertically if they're in multiple lines in a method call.",
kind: .style,
nonTriggeringExamples: [

View File

@ -140,7 +140,7 @@ struct VerticalWhitespaceBetweenCasesRule: ConfigurationProviderRule {
extension VerticalWhitespaceBetweenCasesRule: OptInRule {
static let description = RuleDescription(
identifier: "vertical_whitespace_between_cases",
name: "Vertical Whitespace Between Cases",
name: "Vertical Whitespace between Cases",
description: "Include a single empty line between switch cases.",
kind: .style,
nonTriggeringExamples: (violatingToValidExamples.values + nonTriggeringExamples).sorted(),