-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 back void_function_in_ternary
rule
#3956
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3956 +/- ##
==========================================
- Coverage 92.58% 92.58% -0.01%
==========================================
Files 442 443 +1
Lines 22271 22305 +34
==========================================
+ Hits 20620 20650 +30
- Misses 1651 1655 +4
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following code causes a violation in the last function body while it shouldn't:
func get() -> Int { 1 }
func get(from elements: [Int]) -> Int { elements[0] }
func f(elements: [Int]) -> Int { elements.isEmpty ? get() : get(from: elements) }
nice catch! |
0e502a3
to
9bdacab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Source/SwiftLintFramework/Rules/Idiomatic/VoidFunctionInTernaryConditionRule.swift
Outdated
Show resolved
Hide resolved
Source/SwiftLintFramework/Rules/Idiomatic/VoidFunctionInTernaryConditionRule.swift
Show resolved
Hide resolved
9bdacab
to
14c07d3
Compare
No description provided.