To be consistent with other multiline bracket rules, when we have a multiline if statement we put the opening brace on a new line. Before the rewrite using SwiftSyntax, this usage was never triggered. Now, however it is.
Could this usage either be prevented from triggering the rule, or at least have a configuration option to ignore such cases.
Environment
SwiftLint version (run swiftlint version to be sure)? 0.55.1
Installation method used (Homebrew, CocoaPods, building from source, etc)? Cocoapods
Paste your configuration file:
# insert yaml contents here
Are you using nested configurations? No
If so, paste their relative paths and respective contents.
Which Xcode version are you using (check xcodebuild -version)? 15.3
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.
// This does not trigger violation
guard
condition1,
let var1 = var1
else {
...
// This triggers a violation:
if
condition1,
let var1 = var1
{
New Issue Checklist
Describe the bug
To be consistent with other multiline bracket rules, when we have a multiline if statement we put the opening brace on a new line. Before the rewrite using SwiftSyntax, this usage was never triggered. Now, however it is.
Could this usage either be prevented from triggering the rule, or at least have a configuration option to ignore such cases.
Environment
swiftlint version
to be sure)? 0.55.1xcodebuild -version
)? 15.3echo "[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 useswiftlint lint --path [file here] --no-cache --enable-all-rules
.