# SwiftLint Configuration

## Folders to exclude from linting

excluded:
  - go
  - Pods
  - vendor
  - xcode

## Active rules

opt_in_rules:
  - all

disabled_rules:
  - anonymous_argument_in_multiline_closure
  - balanced_xctest_lifecycle
  - contrasted_opening_brace
  - discouraged_none_name
  - discouraged_object_literal
  - discouraged_optional_collection # Too many false positives in implementations of system protocols.
  - empty_count # Too many false positives for variables named 'count'.
  - explicit_acl
  - explicit_enum_raw_value # Disabled in favor of 'redundant_string_enum_value'.
  - explicit_top_level_acl
  - explicit_type_interface
  - extension_access_modifier
  - file_header
  - file_length
  - file_name
  - file_types_order
  - force_cast
  - force_try
  - force_unwrapping
  - function_body_length
  - implicitly_unwrapped_optional
  - indentation_width
  - legacy_objc_type
  - line_length
  - missing_docs
  - no_empty_block # To be fixed later.
  - no_extension_access_modifier
  - no_grouping_extension
  - no_magic_numbers # Causes a lot of violations in tests.
  - number_separator # Contradicts with SwiftFormat rule 'decimalgrouping'. There are not many numbers anyway in the source code.
  - one_declaration_per_file
  - prefer_nimble
  - prefixed_toplevel_constant # Violations are mostly in test code.
  - private_outlet
  - prohibited_interface_builder
  - prohibited_super_call
  - required_deinit
  - self_binding
  - sorted_enum_cases # Wait for an auto-fix.
  - sorted_imports # Managed by SwiftFormat.
  - type_body_length
  - type_contents_order
  - unowned_variable_capture
  - vertical_whitespace_between_cases # Additional whitespace not needed because of visible indentation.

## Configuration for specific rules

attributes:
  always_on_same_line: []
closure_body_length:
  warning: 40
  error: 60
explicit_init:
  include_bare_init: true
identifier_name:
  excluded: ["id", "to", "Defaults"]
  allowed_symbols: ["_"]
multiline_arguments:
  only_enforce_after_first_closure_on_first_line: true
type_name:
  max_length: 50
trailing_closure:
  only_single_muted_parameter: true
trailing_comma:
  mandatory_comma: true
xct_specific_matcher:
  matchers:
    - two-argument-asserts
