Skip to content

Add void_function_in_ternary opt-in rule - #3085

Merged
marcelofabri merged 2 commits into
masterfrom
mf-void-in-ternary
Feb 8, 2020
Merged

marcelofabri merged 2 commits into
masterfrom
mf-void-in-ternary

Conversation

@marcelofabri

Copy link
Copy Markdown
Collaborator

Fixes #2358

@SwiftLintBot

SwiftLintBot commented Feb 8, 2020 •

Copy link
Copy Markdown
11 Warnings
⚠️ This PR introduced a violation in WordPress: /WordPress/WordPressThisWeekWidget/ThisWeekViewController.swift:123:53: warning: Void Function in Ternary Violation: Using ternary to call Void functions should be avoided. (void_function_in_ternary)
⚠️ This PR introduced a violation in WordPress: /WordPress/WordPressThisWeekWidget/ThisWeekViewController.swift:358:23: warning: Void Function in Ternary Violation: Using ternary to call Void functions should be avoided. (void_function_in_ternary)
⚠️ This PR introduced a violation in WordPress: /WordPress/Classes/ViewRelated/Post/RestorePostTableViewCell.swift:18:23: warning: Void Function in Ternary Violation: Using ternary to call Void functions should be avoided. (void_function_in_ternary)
⚠️ This PR introduced a violation in WordPress: /WordPress/Classes/ViewRelated/Site Creation/SiteInfo/SiteInformationWizardContent.swift:322:24: warning: Void Function in Ternary Violation: Using ternary to call Void functions should be avoided. (void_function_in_ternary)
⚠️ This PR introduced a violation in WordPress: /WordPress/Classes/ViewRelated/Themes/ThemeBrowserViewController.swift:606:30: warning: Void Function in Ternary Violation: Using ternary to call Void functions should be avoided. (void_function_in_ternary)
⚠️ This PR introduced a violation in WordPress: /WordPress/Classes/ViewRelated/Notifications/Views/NoteBlockUserTableViewCell.swift:97:20: warning: Void Function in Ternary Violation: Using ternary to call Void functions should be avoided. (void_function_in_ternary)
⚠️ This PR introduced a violation in WordPress: /WordPress/Classes/ViewRelated/Stats/Shared Views/TopTotalsCell.swift:296:22: warning: Void Function in Ternary Violation: Using ternary to call Void functions should be avoided. (void_function_in_ternary)
⚠️ This PR introduced a violation in WordPress: /WordPress/WordPressAllTimeWidget/AllTimeViewController.swift:123:59: warning: Void Function in Ternary Violation: Using ternary to call Void functions should be avoided. (void_function_in_ternary)
⚠️ This PR introduced a violation in WordPress: /WordPress/WordPressAllTimeWidget/AllTimeViewController.swift:354:23: warning: Void Function in Ternary Violation: Using ternary to call Void functions should be avoided. (void_function_in_ternary)
⚠️ This PR introduced a violation in WordPress: /WordPress/WordPressTodayWidget/TodayViewController.swift:123:59: warning: Void Function in Ternary Violation: Using ternary to call Void functions should be avoided. (void_function_in_ternary)
⚠️ This PR introduced a violation in WordPress: /WordPress/WordPressTodayWidget/TodayViewController.swift:354:23: warning: Void Function in Ternary Violation: Using ternary to call Void functions should be avoided. (void_function_in_ternary)
12 Messages
📖 Linting Aerial with this PR took 1.25s vs 1.22s on master (2% slower)
📖 Linting Alamofire with this PR took 2.29s vs 2.26s on master (1% slower)
📖 Linting Firefox with this PR took 9.48s vs 9.3s on master (1% slower)
📖 Linting Kickstarter with this PR took 15.57s vs 15.26s on master (2% slower)
📖 Linting Moya with this PR took 1.2s vs 1.18s on master (1% slower)
📖 Linting Nimble with this PR took 1.41s vs 1.41s on master (0% slower)
📖 Linting Quick with this PR took 0.55s vs 0.56s on master (1% faster)
📖 Linting Realm with this PR took 2.46s vs 2.39s on master (2% slower)
📖 Linting SourceKitten with this PR took 1.06s vs 1.04s on master (1% slower)
📖 Linting Sourcery with this PR took 7.03s vs 6.92s on master (1% slower)
📖 Linting Swift with this PR took 12.9s vs 12.75s on master (1% slower)
📖 Linting WordPress with this PR took 15.77s vs 15.56s on master (1% slower)

Generated by 🚫 Danger

@marcelofabri
marcelofabri merged commit 1d39071 into master Feb 8, 2020
@marcelofabri
marcelofabri deleted the mf-void-in-ternary branch February 8, 2020 21:23
jpsim added a commit that referenced this pull request Feb 11, 2020
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.

Don't use ternary as an alternative for if else

2 participants