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 triggering examples with parentheses to the number separator rule tests #2704

Merged

Conversation

daltonclaybrook
Copy link
Contributor

Further improves #2683

I did not create a new changelog entry for this PR because it should have been implemented as part of #2687, but I'll be happy to add one anyway if necessary.

Due to how the number is parsed, the violation can occur either inside or outside the opening parenthesis depending on the sign, so I could not simply append new values inside the existing makeTriggeringExamples function. Let me know if you think this should be handled differently.

@daltonclaybrook
Copy link
Contributor Author

Perhaps the rule itself should be improved such that the violation always occurs outside the parentheses. If so, a new issue should be created for that.

@SwiftLintBot
Copy link

1 Warning
⚠️ Please include a CHANGELOG entry to credit yourself!
You can find it at CHANGELOG.md.
12 Messages
📖 Linting Aerial with this PR took 2.03s vs 1.99s on master (2% slower)
📖 Linting Alamofire with this PR took 4.93s vs 4.54s on master (8% slower)
📖 Linting Firefox with this PR took 15.44s vs 13.62s on master (13% slower)
📖 Linting Kickstarter with this PR took 23.76s vs 23.78s on master (0% faster)
📖 Linting Moya with this PR took 2.09s vs 2.16s on master (3% faster)
📖 Linting Nimble with this PR took 2.2s vs 1.94s on master (13% slower)
📖 Linting Quick with this PR took 0.79s vs 0.61s on master (29% slower)
📖 Linting Realm with this PR took 4.39s vs 3.72s on master (18% slower)
📖 Linting SourceKitten with this PR took 1.36s vs 1.31s on master (3% slower)
📖 Linting Sourcery with this PR took 4.69s vs 4.5s on master (4% slower)
📖 Linting Swift with this PR took 31.96s vs 28.94s on master (10% slower)
📖 Linting WordPress with this PR took 24.84s vs 24.99s on master (0% faster)

Here's an example of your CHANGELOG entry:

* Add triggering examples with parentheses to the number separator rule tests.  
  [daltonclaybrook](https://github.com/daltonclaybrook)
  [#issue_number](https://github.com/realm/SwiftLint/issues/issue_number)

note: There are two invisible spaces after the entry's text.

Generated by 🚫 Danger

Copy link
Collaborator

@marcelofabri marcelofabri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@marcelofabri marcelofabri merged commit 800ca0e into realm:master Apr 2, 2019
@daltonclaybrook daltonclaybrook deleted the dc-number-separator-more-examples branch April 2, 2019 23:06
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.

3 participants