-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
add trailing semicolon rule #203
Conversation
@@ -96,4 +96,8 @@ class StringRuleTests: XCTestCase { | |||
func testStatementPosition() { | |||
verifyRule(StatementPositionRule.description) | |||
} | |||
|
|||
func testTrailingSemicolon() { | |||
verifyRule(TrailingSemicolonRule.description, commentDoesntViolate: false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comments shouldn't violate, we want to encourage good grammar in comments!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was trickier to implement, but it's done now. Thanks for the push!
1d94909
to
0a2b9e8
Compare
@@ -29,15 +28,14 @@ extension XCTestCase { | |||
ruleDescription.triggeringExamples.flatMap({ | |||
violations($0, ruleDescription).map({$0.ruleDescription}) | |||
}), | |||
Array(count: ruleDescription.triggeringExamples.count, repeatedValue: ruleDescription)) | |||
Array(count: ruleDescription.triggeringExamples.count, repeatedValue: ruleDescription) | |||
) | |||
|
|||
if commentDoesntViolate { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe should also test that, if a comment does violate, the violation still happens inside a comment?
No description provided.