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

switch_case_on_newline false positive on Xcode 12 beta #3253

Closed
2 tasks done
kacper1703 opened this issue Jun 30, 2020 · 1 comment · Fixed by #3272
Closed
2 tasks done

switch_case_on_newline false positive on Xcode 12 beta #3253

kacper1703 opened this issue Jun 30, 2020 · 1 comment · Fixed by #3272
Labels
bug Unexpected and reproducible misbehavior.

Comments

@kacper1703
Copy link

New Issue Checklist

Describe the bug

On Xcode 12.0 beta the switch_case_on_newline is triggered on a catch in the examples provided below:

do {
  let loadedToken = try tokenManager.decodeToken(from: response)
  return loadedToken
} catch { throw error } // switch_case_on_newline violation here at `catch`
  do {
    let components = try JWTComponents(token: token, authorizationKey: authorizationKey)
    XCTAssertEqual(components.payload.userId, "1234567890")
  } catch { XCTFail(error.localizedDescription) } // switch_case_on_newline violation here at `catch`

Environment

  • SwiftLint version: 0.39.2
  • Installation method: CocoaPods
  • Xcode 12.0 beta (12A6159)
  • Configuration file:
disabled_rules:
  - type_name
  - vertical_parameter_alignment
  - function_default_parameter_at_end

opt_in_rules:
- array_init
- closure_end_indentation
- closure_parameter_position
- closure_spacing
- collection_alignment
- contains_over_filter_count
- contains_over_filter_is_empty
- contains_over_first_not_nil
- convenience_type
- discouraged_object_literal
- duplicate_enum_cases
- empty_collection_literal
- empty_count
- empty_string
- empty_xctest_method
- expiring_todo
- fallthrough
- fatal_error_message
- first_where
- for_where
- force_unwrapping
- implicit_return
- identical_operands
- iteral_expression_end_indentation
- last_where
- legacy_multiple
- legacy_random
- lower_acl_than_parent
- modifier_order
- number_separator
- operator_usage_whitespace
- overridden_super_call
- private_outlet
- private_action
- prohibited_super_call
- sorted_first_last
- sorted_imports
- static_operator
- strong_iboutlet
- switch_case_on_newline
- toggle_bool
- trailing_closure
- unavailable_function
- unneeded_parentheses_in_closure_argument
- unowned_variable_capture
- untyped_error_in_catch
- unused_declaration
- vertical_parameter_alignment_on_call
- xct_specific_matcher
- yoda_condition
@kacper1703
Copy link
Author

Could anyone check on that before Xcode 12 is officially released?

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

Successfully merging a pull request may close this issue.

2 participants