Skip to content

False positive closure_spacing violation #4582

Closed

Description

@Kolos65

New Issue Checklist

Describe the bug

Block comments in closure bodies trigger a closure_spacing violation starting from 0.50.0.

var tapped: (UITapGestureRecognizer) -> Void = { _ in /* no-op */ }
Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint lint

error: Closure Spacing Violation: Closure expressions should have a single space inside each brace. (closure_spacing)

Environment

  • SwiftLint version: 0.50.0
  • Installation method used: Homebrew
  • Configuration file:
opt_in_rules:
  - closure_spacing
closure_spacing:
  severity: error
  • Are you using nested configurations: no
  • Which Xcode version are you using (check xcodebuild -version): 14.1 (14B47b)

Activity

  1. self-assigned this
    on Nov 24, 2022
  2. added
    bug
    on Nov 24, 2022
  3. changed the title [-]False positive closure_spacing violation[/-] [+]False positive `closure_spacing` violation[/+] on Nov 24, 2022
  4. added a commit that references this issue on Nov 24, 2022
  5. jpsim commented on Nov 24, 2022

    @jpsim
    Collaborator

    Thanks for the report. Should be fixed in #4584

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions