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 false positive in UnusedCaptureListRule #2726

Merged
merged 2 commits into from
Apr 23, 2019

Conversation

daltonclaybrook
Copy link
Contributor

Fixes concern raised by @jpsim here.

An array literal was being mistaken for a capture list in some cases.

@SwiftLintBot
Copy link

SwiftLintBot commented Apr 23, 2019

1 Warning
⚠️ Please include a CHANGELOG entry to credit yourself!
You can find it at CHANGELOG.md.
15 Messages
📖 Linting Aerial with this PR took 2.22s vs 2.29s on master (3% faster)
📖 Linting Alamofire with this PR took 4.78s vs 5.06s on master (5% faster)
📖 Linting Firefox with this PR took 16.0s vs 13.87s on master (15% slower)
📖 Linting Kickstarter with this PR took 28.92s vs 24.12s on master (19% slower)
📖 Linting Moya with this PR took 2.6s vs 2.2s on master (18% slower)
📖 Linting Nimble with this PR took 2.42s vs 1.99s on master (21% slower)
📖 Linting Quick with this PR took 0.85s vs 0.62s on master (37% slower)
📖 Linting Realm with this PR took 4.69s vs 3.82s on master (22% slower)
📖 Linting SourceKitten with this PR took 1.54s vs 1.28s on master (20% slower)
📖 Linting Sourcery with this PR took 5.16s vs 4.55s on master (13% slower)
📖 Linting Swift with this PR took 38.13s vs 32.88s on master (15% slower)
📖 Linting WordPress with this PR took 27.33s vs 27.96s on master (2% faster)
📖 This PR fixed a violation in Kickstarter: /Users/vsts/agent/2.150.0/work/1/s/osscheck/Kickstarter/Kickstarter-iOS/Views/Controllers/ProjectPamphletContentViewControllerTests.swift:224:8: warning: Unused Capture List Violation: Unused reference Device.phone4_7inch in a capture list should be removed. (unused_capture_list)
📖 This PR fixed a violation in Kickstarter: /Users/vsts/agent/2.150.0/work/1/s/osscheck/Kickstarter/Kickstarter-iOS/Views/Controllers/ProjectPamphletContentViewControllerTests.swift:224:29: warning: Unused Capture List Violation: Unused reference Device.phone5_8inch in a capture list should be removed. (unused_capture_list)
📖 This PR fixed a violation in Kickstarter: /Users/vsts/agent/2.150.0/work/1/s/osscheck/Kickstarter/Kickstarter-iOS/Views/Controllers/ProjectPamphletContentViewControllerTests.swift:224:50: warning: Unused Capture List Violation: Unused reference Device.pad in a capture list should be removed. (unused_capture_list)

Here's an example of your CHANGELOG entry:

* Fix false positive in UnusedCaptureListRule.  
  [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

CHANGELOG.md Outdated
@@ -95,6 +95,11 @@
[Frederick Pietschmann](https://github.com/fredpi)
[#2670](https://github.com/realm/SwiftLint/issues/2670)

* Fix false positives on `unused_capture_list` which resulted in an array
Copy link
Collaborator

Choose a reason for hiding this comment

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

Changelog entry isn't necessary because this rule hasn't shipped in a release yet.

Copy link
Collaborator

@jpsim jpsim left a comment

Choose a reason for hiding this comment

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

🎉 epic, thanks for fixing so quickly. Let's just remove the unnecessary changelog entry and I'll merge.

@jpsim jpsim merged commit d0ce8b6 into realm:master Apr 23, 2019
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