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

add trailing semicolon rule #203

Merged
merged 2 commits into from
Nov 17, 2015
Merged

add trailing semicolon rule #203

merged 2 commits into from
Nov 17, 2015

Conversation

jpsim
Copy link
Collaborator

@jpsim jpsim commented Nov 17, 2015

No description provided.

@jpsim jpsim mentioned this pull request Nov 17, 2015
5 tasks
@@ -96,4 +96,8 @@ class StringRuleTests: XCTestCase {
func testStatementPosition() {
verifyRule(StatementPositionRule.description)
}

func testTrailingSemicolon() {
verifyRule(TrailingSemicolonRule.description, commentDoesntViolate: false)
Copy link
Contributor

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!

Copy link
Collaborator Author

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!

jpsim added a commit that referenced this pull request Nov 17, 2015
@jpsim jpsim merged commit 4aced1e into master Nov 17, 2015
@jpsim jpsim deleted the jp-trailing-semicolon branch November 17, 2015 20:05
@@ -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 {
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants