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

contains_over_first_not_nil rule now also checks for firstIndex(where:) #2679

Merged
merged 1 commit into from
Apr 9, 2019

Conversation

marcelofabri
Copy link
Collaborator

Fixes #2678

@SwiftLintBot
Copy link

SwiftLintBot commented Mar 13, 2019

1 Warning
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoManager.swift:58:12: warning: Contains over first not nil Violation: Prefer contains over firstIndex(where:) != nil (contains_over_first_not_nil)
12 Messages
📖 Linting Aerial with this PR took 2.55s vs 2.17s on master (17% slower)
📖 Linting Alamofire with this PR took 5.86s vs 5.28s on master (10% slower)
📖 Linting Firefox with this PR took 18.0s vs 16.05s on master (12% slower)
📖 Linting Kickstarter with this PR took 34.68s vs 27.23s on master (27% slower)
📖 Linting Moya with this PR took 2.53s vs 2.17s on master (16% slower)
📖 Linting Nimble with this PR took 2.34s vs 1.97s on master (18% slower)
📖 Linting Quick with this PR took 0.72s vs 0.65s on master (10% slower)
📖 Linting Realm with this PR took 4.17s vs 3.9s on master (6% slower)
📖 Linting SourceKitten with this PR took 1.49s vs 1.4s on master (6% slower)
📖 Linting Sourcery with this PR took 5.07s vs 4.64s on master (9% slower)
📖 Linting Swift with this PR took 34.14s vs 28.85s on master (18% slower)
📖 Linting WordPress with this PR took 29.42s vs 25.41s on master (15% slower)

Generated by 🚫 Danger

@marcelofabri
Copy link
Collaborator Author

I run it locally and the numbers were very different:

Message: Linting Aerial with this PR took 1.78s vs 1.66s on master (7% slower)
Message: Linting Alamofire with this PR took 3.11s vs 2.88s on master (7% slower)
Message: Linting Firefox with this PR took 10.66s vs 10.02s on master (6% slower)
Message: Linting Kickstarter with this PR took 15.15s vs 15.42s on master (1% faster)
Message: Linting Moya with this PR took 1.53s vs 1.64s on master (6% faster)
Message: Linting Nimble with this PR took 1.28s vs 1.31s on master (2% faster)
Message: Linting Quick with this PR took 0.44s vs 0.44s on master (0% slower)
Message: Linting Realm with this PR took 2.6s vs 2.89s on master (10% faster)
Message: Linting SourceKitten with this PR took 0.92s vs 1.08s on master (14% faster)
Message: Linting Sourcery with this PR took 3.33s vs 3.4s on master (2% faster)
Message: Linting Swift with this PR took 25.81s vs 26.16s on master (1% faster)
Message: Linting WordPress with this PR took 15.69s vs 16.28s on master (3% faster)

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.

👍 if running osscheck locally doesn't show a negative performance impact, definitely trust that more than CI.

@marcelofabri marcelofabri merged commit fa1184d into master Apr 9, 2019
@marcelofabri marcelofabri deleted the marcelo/first-index branch April 9, 2019 18:31
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