Skip to content

Commit

Permalink
Apply consistent capitalization to rule names (realm#3938)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimplyDanny authored Dec 26, 2022
1 parent 58611e6 commit 5ff4086
Show file tree
Hide file tree
Showing 22 changed files with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 5ff4086

Please sign in to comment.