From da597eaeca235eb860f2ceb07c5e79945c6d7eda Mon Sep 17 00:00:00 2001 From: Marcelo Fabri Date: Tue, 7 Nov 2023 01:26:15 -0800 Subject: [PATCH] Add example for #3581 (#5334) Fixes #3581 --- CHANGELOG.md | 1 + .../Style/VerticalParameterAlignmentOnCallRule.swift | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b2695a2b..74b9e05ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ * Rewrite `vertical_parameter_alignment_on_call` rule using SwiftSyntax, fixing some false positives. [Marcelo Fabri](https://github.com/marcelofabri) + [#3581](https://github.com/realm/SwiftLint/issues/3581) * Rewrite `no_grouping_extension` rule using SwiftSyntax. [Marcelo Fabri](https://github.com/marcelofabri) diff --git a/Source/SwiftLintBuiltInRules/Rules/Style/VerticalParameterAlignmentOnCallRule.swift b/Source/SwiftLintBuiltInRules/Rules/Style/VerticalParameterAlignmentOnCallRule.swift index 3261ec04b..6eb28fab1 100644 --- a/Source/SwiftLintBuiltInRules/Rules/Style/VerticalParameterAlignmentOnCallRule.swift +++ b/Source/SwiftLintBuiltInRules/Rules/Style/VerticalParameterAlignmentOnCallRule.swift @@ -71,6 +71,17 @@ struct VerticalParameterAlignmentOnCallRule: OptInRule { Example(""" myFunc(foo: 0, bar: baz == 0) + """), + Example(""" + UIViewPropertyAnimator.runningPropertyAnimator( + withDuration: 2.0, + delay: 0.0, + options: [.curveEaseIn] + ) { + // animations + } completion: { _ in + // completion + } """) ], triggeringExamples: [