File tree Expand file tree Collapse file tree 6 files changed +9
-5
lines changed Expand file tree Collapse file tree 6 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ enum RuleRegistry {
17
17
" AllPublicDeclarationsHaveDocumentation " : false ,
18
18
" AlwaysUseLowerCamelCase " : true ,
19
19
" AmbiguousTrailingClosureOverload " : true ,
20
- " BeginDocumentationCommentWithOneLineSummary " : true ,
20
+ " BeginDocumentationCommentWithOneLineSummary " : false ,
21
21
" DoNotUseSemicolons " : true ,
22
22
" DontRepeatTypeInStaticProperties " : true ,
23
23
" FileScopedDeclarationPrivacy " : true ,
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import SwiftSyntax
18
18
/// Lint: If a public declaration is missing a documentation comment, a lint error is raised.
19
19
public final class AllPublicDeclarationsHaveDocumentation : SyntaxLintRule {
20
20
21
- /// Identifies this rule was being opt-in. While docs on most public declarations are beneficial,
21
+ /// Identifies this rule as being opt-in. While docs on most public declarations are beneficial,
22
22
/// there are a number of public decls where docs are either redundant or superfluous. This rule
23
23
/// can't differentiate those situations and will make a lot of noise for projects that are
24
24
/// intentionally avoiding docs on some decls.
Original file line number Diff line number Diff line change @@ -26,6 +26,10 @@ public final class BeginDocumentationCommentWithOneLineSummary: SyntaxLintRule {
26
26
/// This allows test runs on those platforms to test both implementations.
27
27
public static var _forcesFallbackModeForTesting = false
28
28
29
+ /// Identifies this rule as being opt-in. Well written docs on declarations are important, but
30
+ /// this rule isn't linguistically advanced enough on all platforms to be applied universally.
31
+ public override class var isOptIn : Bool { return true }
32
+
29
33
public override func visit( _ node: FunctionDeclSyntax ) -> SyntaxVisitorContinueKind {
30
34
diagnoseDocComments ( in: DeclSyntax ( node) )
31
35
return . skipChildren
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import SwiftSyntax
18
18
/// Lint: If a force unwrap is used, a lint warning is raised.
19
19
public final class NeverForceUnwrap : SyntaxLintRule {
20
20
21
- /// Identifies this rule was being opt-in. While force unwrap is an unsafe pattern (i.e. it can
21
+ /// Identifies this rule as being opt-in. While force unwrap is an unsafe pattern (i.e. it can
22
22
/// crash), there are valid contexts for force unwrap where it won't crash. This rule can't
23
23
/// evaluate the context around the force unwrap to make that determination.
24
24
public override class var isOptIn : Bool { return true }
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import SwiftSyntax
23
23
/// TODO: Create exception for NSRegularExpression
24
24
public final class NeverUseForceTry : SyntaxLintRule {
25
25
26
- /// Identifies this rule was being opt-in. While force try is an unsafe pattern (i.e. it can
26
+ /// Identifies this rule as being opt-in. While force try is an unsafe pattern (i.e. it can
27
27
/// crash), there are valid contexts for force try where it won't crash. This rule can't
28
28
/// evaluate the context around the force try to make that determination.
29
29
public override class var isOptIn : Bool { return true }
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import SwiftSyntax
25
25
/// Lint: Declaring a property with an implicitly unwrapped type yields a lint error.
26
26
public final class NeverUseImplicitlyUnwrappedOptionals : SyntaxLintRule {
27
27
28
- /// Identifies this rule was being opt-in. While accessing implicitly unwrapped optionals is an
28
+ /// Identifies this rule as being opt-in. While accessing implicitly unwrapped optionals is an
29
29
/// unsafe pattern (i.e. it can crash), there are valid contexts for using implicitly unwrapped
30
30
/// optionals where it won't crash. This rule can't evaluate the context around the usage to make
31
31
/// that determination.
You can’t perform that action at this time.
0 commit comments