Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add ReduceBooleanRule #2675

Merged
merged 7 commits into from
Mar 10, 2019
Merged

Add ReduceBooleanRule #2675

merged 7 commits into from
Mar 10, 2019

Conversation

xavierLowmiller
Copy link
Contributor

Implements rule request #2583.

@SwiftLintBot
Copy link

SwiftLintBot commented Mar 9, 2019

7 Warnings
⚠️ This PR introduced a violation in Firefox: /Users/vsts/agent/2.148.0/work/1/s/osscheck/Firefox/Client/Frontend/Browser/TabDisplayManager.swift:158:100: warning: Reduce Boolean Violation: Use allSatisfy instead (reduce_boolean)
⚠️ This PR introduced a violation in Firefox: /Users/vsts/agent/2.148.0/work/1/s/osscheck/Firefox/Sync/BookmarkTelemetryPing.swift:8:27: warning: Reduce Boolean Violation: Use contains instead (reduce_boolean)
⚠️ This PR introduced a violation in Firefox: /Users/vsts/agent/2.148.0/work/1/s/osscheck/Firefox/SyncTelemetry/SyncTelemetryEvents.swift:59:24: warning: Reduce Boolean Violation: Use allSatisfy instead (reduce_boolean)
⚠️ This PR introduced a violation in Kickstarter: /Users/vsts/agent/2.148.0/work/1/s/osscheck/Kickstarter/Library/Navigation.swift:575:52: warning: Reduce Boolean Violation: Use contains instead (reduce_boolean)
⚠️ This PR introduced a violation in Kickstarter: /Users/vsts/agent/2.148.0/work/1/s/osscheck/Kickstarter/Library/Navigation.swift:582:42: warning: Reduce Boolean Violation: Use contains instead (reduce_boolean)
⚠️ This PR introduced a violation in Quick: /Users/vsts/agent/2.148.0/work/1/s/osscheck/Quick/Sources/Quick/World.swift:151:50: warning: Reduce Boolean Violation: Use contains instead (reduce_boolean)
⚠️ This PR introduced a violation in Quick: /Users/vsts/agent/2.148.0/work/1/s/osscheck/Quick/Sources/Quick/World.swift:220:56: warning: Reduce Boolean Violation: Use contains instead (reduce_boolean)
12 Messages
📖 Linting Aerial with this PR took 2.13s vs 1.83s on master (16% slower)
📖 Linting Alamofire with this PR took 5.75s vs 4.06s on master (41% slower)
📖 Linting Firefox with this PR took 15.68s vs 12.55s on master (24% slower)
📖 Linting Kickstarter with this PR took 22.8s vs 20.49s on master (11% slower)
📖 Linting Moya with this PR took 2.05s vs 1.82s on master (12% slower)
📖 Linting Nimble with this PR took 1.93s vs 1.82s on master (6% slower)
📖 Linting Quick with this PR took 0.59s vs 0.56s on master (5% slower)
📖 Linting Realm with this PR took 3.88s vs 3.39s on master (14% slower)
📖 Linting SourceKitten with this PR took 1.23s vs 1.15s on master (6% slower)
📖 Linting Sourcery with this PR took 4.5s vs 4.09s on master (10% slower)
📖 Linting Swift with this PR took 28.99s vs 27.4s on master (5% slower)
📖 Linting WordPress with this PR took 21.49s vs 21.31s on master (0% slower)

Generated by 🚫 Danger

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.

Looks good overall, I just have some small comments.

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.

Great work!

@jpsim jpsim merged commit 57af7f0 into realm:master Mar 10, 2019
@xavierLowmiller xavierLowmiller deleted the reduce-boolean branch March 11, 2019 06:05
tcamin pushed a commit to Subito-it/SwiftLint that referenced this pull request Jun 17, 2019
* [reduce_boolean] Implement rule

* [reduce_boolean] Improve reason text

* [reduce_boolean] Fix new violations

* [reduce_boolean] Add CHANGELOG.md entry

* [reduce_boolean] Shorten rule name

* [reduce_boolean] Use regular map instead of compactMap

* [reduce_boolean] Match only possible syntax kinds
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants