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 for empty_enum_arguments #2041

Closed
lilyball opened this issue Feb 7, 2018 · 0 comments
Closed

False positive for empty_enum_arguments #2041

lilyball opened this issue Feb 7, 2018 · 0 comments
Labels
bug Unexpected and reproducible misbehavior.

Comments

@lilyball
Copy link

lilyball commented Feb 7, 2018

Bug Report

The empty_enum_arguments rule has a false positive on a line that looks like

case (let f as () -> String)?:

It highlights the open parenthesis from the nested pair with the message

warning: Empty Enum Arguments Violation: Arguments can be omitted when matching enums with associated types if they are not used. (empty_enum_arguments)

Environment

  • SwiftLint version (run swiftlint version to be sure)?

0.24.0

  • Installation method used (Homebrew, CocoaPods, building from source, etc)?

CocoaPods

  • Paste your configuration file:
.swiftlint.yml
disabled_rules:
  - force_cast
  - notification_center_detachment
  - identifier_name
  - trailing_comma
  - type_name
  - trailing_whitespace
  - conditional_returns_on_newline
  - opening_brace
  - cyclomatic_complexity
  - todo
  - fallthrough
  - force_try
  - unneeded_parentheses_in_closure_argument
  - nesting
  - unused_closure_parameter
  - large_tuple
opt_in_rules:
  - empty_count
  - closure_spacing
  - conditional_returns_on_newline
  - explicit_init
  - fatal_error_message
  - first_where
  - overridden_super_call
  - private_outlet
  - prohibited_super_call
  - redundant_nil_coalescing
  - sorted_first_last
  - override_in_extension
  - private_over_fileprivate
  - private_unit_test
included:
  - ./
excluded: # paths to ignore during linting. Takes precedence over `included`.
  - Code/GraphQL/API.swift

# Rule Configuration
line_length: 200
function_body_length:
  warning: 200
  error: 400
type_body_length:
  warning: 500
  error: 600
file_length:
  warning: 1000
  error: 2000
function_parameter_count:
  warning: 10
type_name:
  min_length: 4
  max_length: 60
identifier_name:
  min_length:
    error: 3
  excluded:
    - id
    - URL
private_outlet:
  allow_private_set: true

reporter: "xcode"
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