forked from realm/SwiftLint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation comments to all public declarations (realm#3027)
- Loading branch information
Showing
57 changed files
with
693 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/// The rule list containing all available rules built into SwiftLint. | ||
public let masterRuleList = RuleList(rules: [ | ||
{% for rule in types.structs where rule.name|hasSuffix:"Rule" or rule.name|hasSuffix:"Rules" %} {{ rule.name }}.self{% if not forloop.last %},{% endif %} | ||
{% endfor %}]) |
2 changes: 1 addition & 1 deletion
2
Source/SwiftLintFramework/Documentation/RuleDocumentation.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
Source/SwiftLintFramework/Extensions/Configuration+IndentationStyle.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 18 additions & 2 deletions
20
Source/SwiftLintFramework/Extensions/FileManager+SwiftLint.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
Source/SwiftLintFramework/Extensions/SwiftExpressionKind.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
/// The kind of expression for a contiguous set of Swift source tokens. | ||
public enum SwiftExpressionKind: String { | ||
/// A call to a named function or closure. | ||
case call = "source.lang.swift.expr.call" | ||
/// An argument value for a function or closure. | ||
case argument = "source.lang.swift.expr.argument" | ||
/// An Array expression. | ||
case array = "source.lang.swift.expr.array" | ||
/// A Dictionary expression. | ||
case dictionary = "source.lang.swift.expr.dictionary" | ||
/// An object literal expression. https://developer.apple.com/swift/blog/?id=33 | ||
case objectLiteral = "source.lang.swift.expr.object_literal" | ||
/// A closure expression. https://docs.swift.org/swift-book/LanguageGuide/Closures.html | ||
case closure = "source.lang.swift.expr.closure" | ||
/// A tuple expression. https://docs.swift.org/swift-book/ReferenceManual/Types.html#ID448 | ||
case tuple = "source.lang.swift.expr.tuple" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
struct RegexHelpers { | ||
// A single variable | ||
/// A single variable | ||
static let varName = "[a-zA-Z_][a-zA-Z0-9_]+" | ||
|
||
// A single variable in a group (capturable) | ||
/// A single variable in a group (capturable) | ||
static let varNameGroup = "\\s*(\(varName))\\s*" | ||
|
||
// Two variables (capturables) | ||
/// Two variables (capturables) | ||
static let twoVars = "\(varNameGroup),\(varNameGroup)" | ||
|
||
// A number | ||
/// A number | ||
static let number = "[\\-0-9\\.]+" | ||
|
||
// A variable or a number (capturable) | ||
/// A variable or a number (capturable) | ||
static let variableOrNumber = "\\s*(\(varName)|\(number))\\s*" | ||
|
||
// Two 'variable or number' | ||
/// Two 'variable or number' | ||
static let twoVariableOrNumber = "\(variableOrNumber),\(variableOrNumber)" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.