-
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
indentation_width warning on multiple cases of switch-case #3046
Comments
Related,
|
Facing the same thing here |
This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions! |
This is still something to address |
... and possibly more. So you end up with either: // indentation_width violation
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: LaunchOptions = nil) -> Bool { or // vertical_parameter_alignment violation (also, more generally, incorrect formatting by most standards)
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: LaunchOptions = nil) -> Bool { Tough problem to solve! Perhaps introducing a property to a Rule to define conflicting rules, and the relative priority. |
This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions! |
This is still something to address |
Just one more case that I thought was worth pointing out. Xcode's newish if let foo = bar(),
let baz = quux, // Indentation width violation... |
Ditto for |
Facing same issue. |
Facing the same issue here |
I'm seeing this too. Impossible to satisfy both indentation_width and a number of other rules. Guess I'm going to have to disable it for now |
I am against any changes to this rule. This rule works completely correct and it has no conflicts with other rules. The fact is, people expect it to not warn about indentation problem when there is in fact an indentation problem. Why using column indentation is even a relevant argument? This is how functions should be indented with vertical parameter alignment AND correct indentation:
|
Workaround for
|
Hello! Any news/updates? |
Also facing the same issue. |
I'd still like the original "indentation_width warning on multiple cases of switch-case" addressed to allow:
And not demand:
In the original the warning is shown on the |
Workaround for
|
New Issue Checklist
Describe the bug
When the
indentation_width
is enabled, it would give warning on a multiple cases in different lines for switch-case statement:Sample:
Complete output when running SwiftLint, including the stack trace and command used
Environment
swiftlint version
to be sure)?0.38.2
CocoaPods
# insert yaml contents here
If so, paste their relative paths and respective contents.
No
xcodebuild -version
)?Xcode 11.3
echo "[string here]" | swiftlint lint --no-cache --use-stdin --enable-all-rules
to quickly test if your example is really demonstrating the issue. If your example is more
complex, you can use
swiftlint lint --path [file here] --no-cache --enable-all-rules
.The text was updated successfully, but these errors were encountered: