Skip to content

Multiline arguments violation with multiple trailing closures #3605

@jakubkiermasz-zd

Description

@jakubkiermasz-zd

New Issue Checklist

Describe the bug

For below code

talkProvider.getAvailability(forUser: userId) { [weak self] response in
    self?.handleSuccess(response)
} onError: { [weak self] _ in
    self?.handleError()
}

I receive this warning:
Multiline Arguments Violation: Arguments should be either on the same line, or one per line. (multiline_arguments)

Environment

  • SwiftLint version (run swiftlint version to be sure)? 0.43.1
  • Installation method used (Homebrew, CocoaPods, building from source, etc)? Pods
  • Are you using nested configurations? nope
  • Which Xcode version are you using (check xcodebuild -version)? Xcode 12.4 Build version 12D4e
  • Do you have a sample that shows the issue? Yes, it is. Done linting! Found 1 violation, 0 serious in 1 file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions