Skip to content

Commit

Permalink
Merge pull request #978 from realm/jp-one-char-fix
Browse files Browse the repository at this point in the history
fix specifying multiple rule identifiers in comment commands
  • Loading branch information
jpsim authored Dec 13, 2016
2 parents 11bfa93 + 177e055 commit 1bafa99
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
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

0 comments on commit 1bafa99

Please sign in to comment.