New Issue Checklist
Describe the bug
vertical_parameter_alignment_on_call fails when a method call:
- lists its parameters vertically
- has multiple trailing closures
- has the closing parenthesis and the first opening brace
) { on a new line
Complete output when running SwiftLint, including the stack trace and command used
$ ./Pods/SwiftLint/swiftlint
Linting Swift files in current working directory
Linting 'TestArea.swift' (1/1)
/Users/commscheck/src/commscheck/SwiftLintTrailingClosures/Shared/TestArea.swift:11:11: warning: Vertical Parameter Alignment On Call Violation: Function parameters should be aligned vertically if they're in multiple lines in a method call. (vertical_parameter_alignment_on_call)
Done linting! Found 1 violation, 0 serious in 1 file.
Environment
- SwiftLint version (run
swiftlint version to be sure)? 0.43.1
- Installation method used (Homebrew, CocoaPods, building from source, etc)? CocoaPods
- Paste your configuration file:
opt_in_rules:
- vertical_parameter_alignment_on_call
- Are you using nested configurations? No
- Which Xcode version are you using (check
xcodebuild -version)? 12.4.0
- Do you have a sample that shows the issue? Run
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.
// Passes as expected
UIViewPropertyAnimator.runningPropertyAnimator(
withDuration: 2.0,
delay: 0.0,
options: [.curveEaseIn]
) {
// animations
}
// Passes as expected
UIViewPropertyAnimator.runningPropertyAnimator(
withDuration: 2.0,
delay: 0.0,
options: [.curveEaseIn]) {
// animations
} completion: { _ in
// completion
}
// Triggers a violation
UIViewPropertyAnimator.runningPropertyAnimator(
withDuration: 2.0,
delay: 0.0,
options: [.curveEaseIn]
) {
// animations
} completion: { _ in
// completion
}
New Issue Checklist
Describe the bug
vertical_parameter_alignment_on_callfails when a method call:) {on a new lineComplete output when running SwiftLint, including the stack trace and command used
Environment
swiftlint versionto be sure)? 0.43.1xcodebuild -version)? 12.4.0echo "[string here]" | swiftlint lint --no-cache --use-stdin --enable-all-rulesto 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.