@@ -9,6 +9,47 @@ configuration file, as described in
9
9
applied in the linter, but only some of them can format your source code
10
10
automatically.
11
11
12
+ Here's the list of available rules:
13
+
14
+ - [ AllPublicDeclarationsHaveDocumentation] ( #AllPublicDeclarationsHaveDocumentation )
15
+ - [ AlwaysUseLowerCamelCase] ( #AlwaysUseLowerCamelCase )
16
+ - [ AmbiguousTrailingClosureOverload] ( #AmbiguousTrailingClosureOverload )
17
+ - [ BeginDocumentationCommentWithOneLineSummary] ( #BeginDocumentationCommentWithOneLineSummary )
18
+ - [ DoNotUseSemicolons] ( #DoNotUseSemicolons )
19
+ - [ DontRepeatTypeInStaticProperties] ( #DontRepeatTypeInStaticProperties )
20
+ - [ FileScopedDeclarationPrivacy] ( #FileScopedDeclarationPrivacy )
21
+ - [ FullyIndirectEnum] ( #FullyIndirectEnum )
22
+ - [ GroupNumericLiterals] ( #GroupNumericLiterals )
23
+ - [ IdentifiersMustBeASCII] ( #IdentifiersMustBeASCII )
24
+ - [ NeverForceUnwrap] ( #NeverForceUnwrap )
25
+ - [ NeverUseForceTry] ( #NeverUseForceTry )
26
+ - [ NeverUseImplicitlyUnwrappedOptionals] ( #NeverUseImplicitlyUnwrappedOptionals )
27
+ - [ NoAccessLevelOnExtensionDeclaration] ( #NoAccessLevelOnExtensionDeclaration )
28
+ - [ NoAssignmentInExpressions] ( #NoAssignmentInExpressions )
29
+ - [ NoBlockComments] ( #NoBlockComments )
30
+ - [ NoCasesWithOnlyFallthrough] ( #NoCasesWithOnlyFallthrough )
31
+ - [ NoEmptyTrailingClosureParentheses] ( #NoEmptyTrailingClosureParentheses )
32
+ - [ NoLabelsInCasePatterns] ( #NoLabelsInCasePatterns )
33
+ - [ NoLeadingUnderscores] ( #NoLeadingUnderscores )
34
+ - [ NoParensAroundConditions] ( #NoParensAroundConditions )
35
+ - [ NoPlaygroundLiterals] ( #NoPlaygroundLiterals )
36
+ - [ NoVoidReturnOnFunctionSignature] ( #NoVoidReturnOnFunctionSignature )
37
+ - [ OmitExplicitReturns] ( #OmitExplicitReturns )
38
+ - [ OneCasePerLine] ( #OneCasePerLine )
39
+ - [ OneVariableDeclarationPerLine] ( #OneVariableDeclarationPerLine )
40
+ - [ OnlyOneTrailingClosureArgument] ( #OnlyOneTrailingClosureArgument )
41
+ - [ OrderedImports] ( #OrderedImports )
42
+ - [ ReplaceForEachWithForLoop] ( #ReplaceForEachWithForLoop )
43
+ - [ ReturnVoidInsteadOfEmptyTuple] ( #ReturnVoidInsteadOfEmptyTuple )
44
+ - [ TypeNamesShouldBeCapitalized] ( #TypeNamesShouldBeCapitalized )
45
+ - [ UseEarlyExits] ( #UseEarlyExits )
46
+ - [ UseLetInEveryBoundCaseVariable] ( #UseLetInEveryBoundCaseVariable )
47
+ - [ UseShorthandTypeNames] ( #UseShorthandTypeNames )
48
+ - [ UseSingleLinePropertyGetter] ( #UseSingleLinePropertyGetter )
49
+ - [ UseSynthesizedInitializer] ( #UseSynthesizedInitializer )
50
+ - [ UseTripleSlashForDocumentationComments] ( #UseTripleSlashForDocumentationComments )
51
+ - [ UseWhereClausesInForLoops] ( #UseWhereClausesInForLoops )
52
+ - [ ValidateDocumentationComments] ( #ValidateDocumentationComments )
12
53
13
54
### AllPublicDeclarationsHaveDocumentation
14
55
@@ -261,6 +302,15 @@ Format: Parentheses around such expressions are removed, if they do not cause a
261
302
262
303
` NoParensAroundConditions ` rule can format your code automatically.
263
304
305
+ ### NoPlaygroundLiterals
306
+
307
+ The playground literals (` #colorLiteral ` , ` #fileLiteral ` , and ` #imageLiteral ` ) are forbidden.
308
+
309
+ Lint: Using a playground literal will yield a lint error with a suggestion of an API to replace
310
+ it.
311
+
312
+ ` NoPlaygroundLiterals ` is a linter-only rule.
313
+
264
314
### NoVoidReturnOnFunctionSignature
265
315
266
316
Functions that return ` () ` or ` Void ` should omit the return signature.
0 commit comments