Make custom rule `rule_id` more specific
This commit is contained in:
parent
bd77cbcf6e
commit
1940e0e2d2
|
@ -73,7 +73,7 @@ custom_rules:
|
|||
included: Source/SwiftLintFramework/Rules/.+/\w+\.swift
|
||||
name: Rule ID
|
||||
message: Rule IDs must be all lowercase, snake case and not end with `rule`
|
||||
regex: identifier:\s*("\w+_rule"|"\S*[^a-z_]\S*")
|
||||
regex: ^\s+identifier:\s*("\w+_rule"|"\S*[^a-z_]\S*")
|
||||
severity: error
|
||||
fatal_error:
|
||||
name: Fatal Error
|
||||
|
|
|
@ -147,7 +147,6 @@ private extension PreferSelfTypeOverTypeOfSelfRule {
|
|||
|
||||
correctionPositions.append(function.positionAfterSkippingLeadingTrivia)
|
||||
|
||||
// swiftlint:disable:next rule_id
|
||||
let base = IdentifierExprSyntax(identifier: "Self")
|
||||
let baseWithTrivia = base
|
||||
.with(\.leadingTrivia, function.leadingTrivia ?? .zero)
|
||||
|
|
Loading…
Reference in New Issue