-
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
Unexpected Multiline Arguments Violation in function call with completion block #3399
Comments
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! |
It is still a bug in version 0.42.0 |
Just ran into this, too with the following SwiftUI code: Picker(selection: viewStore.binding(\.$someProperty)) {
ForEach(SomeEnum.allCases, id: \.rawValue) { someCase in
Text(someCase.rawValue)
.tag(someCase)
}
} label: {
EmptyView()
} |
It is still a bug in version 0.49.1 |
Still a but in 0.50.1 |
Still a bug in version 0.50.3. I always get some false positive warning when using multiple trailing closures along with other parameters, regardless of whether I place those other parameters on multiple lines. TestView(
param1: "something",
param2: 0
) { // Vertical Parameter Alignment On Call Violation
Text("Some view 1")
} closure2: {
Text("Some view 2")
} TestView(param1: "something", param2: 0) { // Multiline Arguments Violation
Text("Some view 1")
} closure2: {
Text("Some view 2")
} No warnings: TestView {
Text("Some view 1")
} closure2: {
Text("Some view 2")
} |
New Issue Checklist
Describe the bug
It seems that in a specific case of a function call with a completion block where the function's arguments are one per line, a violation is triggered if the final parentheses of the arguments are on the same line.
Sorry if I'm missing something. I looked at the rules for Multiline Arguments and looked for issues but it seems to me that my example that triggers the violation should not occur.
Complete output when running SwiftLint, including the stack trace and command used
Environment
example that trigger a violation:
examples that do not trigger a violation:
The text was updated successfully, but these errors were encountered: