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

Extend ImplicitReturnRule to apply to switch statements #5665

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Iikeli
Copy link

@Iikeli Iikeli commented Jul 11, 2024

Nonviolating examples:

switch someBool {
case true: true
case false: false
}

switch someBool {
case true:
    true
case false:
    false
}

Violating examples:

switch someBool {
case true: return true
case false: return false
}

someBool {
case true:return true
case false:
    ↓return false
}

@SwiftLintBot
Copy link

SwiftLintBot commented Jul 11, 2024

Danger has errored

[!] Invalid Dangerfile file: Invalid argument @ io_fread - /var/folders/k1/02xbzn0s7mlcnqfq1_sr5mhc0000gn/T/violations20240716-31125-1kxvr8n. Updating the Danger gem might fix the issue. Your Danger version: 9.2.0, latest Danger version: 9.4.3

 #  from Dangerfile:74
 #  -------------------------------------------
 #  
 >  lines = file.read.chomp
 #  file.close
 #  -------------------------------------------

Generated by 🚫 Danger

@Iikeli Iikeli marked this pull request as draft July 11, 2024 13:08
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.

None yet

3 participants