Closed
Description
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"