Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive closure_spacing with only comment inside #4565

Closed
2 tasks done
Igor-Palaguta opened this issue Nov 21, 2022 · 1 comment
Closed
2 tasks done

False positive closure_spacing with only comment inside #4565

Igor-Palaguta opened this issue Nov 21, 2022 · 1 comment
Labels
bug Unexpected and reproducible misbehavior.

Comments

@Igor-Palaguta
Copy link

New Issue Checklist

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 use swiftlint lint --path [file here] --no-cache --enable-all-rules.
// This triggers a violation:
let test1 = func1(arg: { /* do nothing */ })
let test2 = func1 { /* do nothing */ }
jpsim added a commit that referenced this issue Nov 25, 2022
@jpsim
Copy link
Collaborator

jpsim commented Nov 25, 2022

Fixed in #4584

@jpsim jpsim closed this as completed Nov 25, 2022
@jpsim jpsim added the bug Unexpected and reproducible misbehavior. label Nov 25, 2022
jpsim added a commit that referenced this issue Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected and reproducible misbehavior.
Projects
None yet
Development

No branches or pull requests

2 participants