Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix specifying multiple rule identifiers in comment commands #978

Merged
merged 2 commits into from
Dec 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
empty parentheses after method call when using trailing closures.
[Marcelo Fabri](https://github.com/marcelofabri)
[#885](https://github.com/realm/SwiftLint/issues/885)

* Add `closure_parameter_position` rule that validates that closure
parameters are in the same line as the opening brace.
[Marcelo Fabri](https://github.com/marcelofabri)
Expand Down Expand Up @@ -97,6 +97,10 @@
[Marcelo Fabri](https://github.com/marcelofabri)
[#940](https://github.com/realm/SwiftLint/issues/940)

* Fix specifying multiple rule identifiers in comment commands.
[JP Simard](https://github.com/jpsim)
[#976](https://github.com/realm/SwiftLint/issues/976)

## 0.13.2: Light Cycle

##### Breaking
Expand Down
2 changes: 1 addition & 1 deletion Source/SwiftLintFramework/Extensions/File+SwiftLint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ extension File {
return []
}
let contents = self.contents.bridge()
return matchPattern("swiftlint:(enable|disable)(:previous|:this|:next)?\\ [^\\s]+",
return matchPattern("swiftlint:(enable|disable)(:previous|:this|:next)?\\ [^\\n]+",
withSyntaxKinds: [.comment]).flatMap { range in
return Command(string: contents, range: range)
}.flatMap { command in
Expand Down
6 changes: 4 additions & 2 deletions Tests/SwiftLintFrameworkTests/RulesTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ class RulesTests: XCTestCase {
verifyRule(MarkRule.description, commentDoesntViolate: false)
}

// swiftlint:disable:this todo FIXME: https://github.com/jpsim/SourceKitten/issues/269
// swiftlint:disable:next todo
// FIXME: https://github.com/jpsim/SourceKitten/issues/269
// func testMissingDocs() {
// verifyRule(MissingDocsRule.description)
// }
Expand Down Expand Up @@ -362,7 +363,8 @@ class RulesTests: XCTestCase {
verifyRule(TypeNameRule.description)
}

// swiftlint:disable:this todo FIXME: https://github.com/jpsim/SourceKitten/issues/269
// swiftlint:disable:next todo
// FIXME: https://github.com/jpsim/SourceKitten/issues/269
// func testValidDocs() {
// verifyRule(ValidDocsRule.description)
// }
Expand Down