Apply consistent capitalization to rule names (#3938)
This commit is contained in:
parent
58611e6718
commit
5ff40867b3
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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: [
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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: [
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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: [
|
||||
|
|
|
@ -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: [
|
||||
|
|
|
@ -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: [
|
||||
|
|
|
@ -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: [
|
||||
|
|
|
@ -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: [
|
||||
|
|
|
@ -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: [
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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: [
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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: [
|
||||
|
|
|
@ -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: [
|
||||
|
|
|
@ -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: [
|
||||
|
|
|
@ -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: [
|
||||
|
|
|
@ -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: [
|
||||
|
|
|
@ -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(),
|
||||
|
|
Loading…
Reference in New Issue