-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
bugUnexpected and reproducible misbehavior.Unexpected and reproducible misbehavior.
Description
New Issue Checklist
- Updated SwiftLint to the latest version
- I searched for existing GitHub issues
Describe the bug
closure_spacing is fired when closure contains only comment
Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint lint
warning: Closure Spacing Violation: Closure expressions should have a single space inside each brace. (closure_spacing)
Environment
- SwiftLint version (run
swiftlint version
to be sure)? 0.50.0 - Installation method used (Homebrew, CocoaPods, building from source, etc)? Cocoapods
- Paste your configuration file:
opt_in_rules:
- closure_spacing
- Are you using nested configurations?
no - Which Xcode version are you using (check
xcodebuild -version
)?
Xcode 14.0
Build version 14A309 - Do you have a sample that shows the issue? Run
echo "let test1 = func1(arg: { /* do nothing */ })" | 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
.
// This triggers a violation:
let test1 = func1(arg: { /* do nothing */ })
let test2 = func1 { /* do nothing */ }
dzungaria
Metadata
Metadata
Assignees
Labels
bugUnexpected and reproducible misbehavior.Unexpected and reproducible misbehavior.