⬆️ :: Update dependencies

This commit is contained in:
Felix Mau
2021-07-31 15:43:15 +02:00
parent 3af5785f80
commit 9fa317bbd3
4 changed files with 13 additions and 6 deletions
+7
View File
@@ -5,6 +5,7 @@
# Based on:
# - https://gist.github.com/tweetjay/1b7f00b6f312a5a2cf7b5676420b9b0c
# - https://github.com/brandenr/swiftlintconfig
# - https://www.avanderlee.com/optimization/swiftlint-optin-rules/
#
opt_in_rules:
@@ -15,23 +16,27 @@ opt_in_rules:
- contains_over_filter_count # Prefer `contains` over comparing `filter(where:).count` to 0.
- contains_over_filter_is_empty # Prefer `contains` over using `filter(where:).isEmpty`.
- contains_over_first_not_nil # Prefer `contains` over `first(where:) != nil` and `firstIndex(where:) != nil`.
- convenience_type # Types used for hosting only static members should be implemented as a caseless enum to avoid instantiation.
- empty_collection_literal # Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal.
- empty_count # Prefer checking `isEmpty` over comparing count to zero.
- empty_parameters # Prefer `() ->` over `Void ->`.
- empty_string # Prefer checking `isEmpty` over comparing string to an empty string literal.
- empty_xctest_method # Empty XCTest method should be avoided.
- explicit_init # Explicitly calling .init() should be avoided.
- fallthrough # Fallthrough should be avoided.
- fatal_error_message # A fatalError call should have a message.
- file_header # Header comments should be consistent with project patterns.
- first_where # Prefer using `.first(where:)` over `.filter { }.first` in collections.
- for_where # `where` clauses are preferred over a single `if` inside a `for`.
- force_unwrapping # Force unwrapping should be avoided.
- identical_operands # Comparing two identical operands is likely a mistake.
- is_disjoint # Prefer using `Set.isDisjoint(with:)` over `Set.intersection(_:).isEmpty`.
- last_where # Prefer using `.last(where:)` over `.filter { }.last` in collections.
- legacy_multiple # Prefer using the `isMultiple(of:)` function instead of using the remainder operator (`%`).
- legacy_random # Prefer using `type.random(in:)` over legacy functions, e.g. `arc4random()`.
- lower_acl_than_parent # Ensure definitions have a lower access control level than their enclosing parent.
- missing_docs # Declarations should be documented.
- modifier_order # Modifier order should be consistent.
- object_literal # Prefer object literals over image and color inits.
- operator_usage_whitespace # Operators should be surrounded by a single whitespace when they are being used.
- optional_enum_case_matching # Matching an enum case against an optional enum without ‘?’.
@@ -39,9 +44,11 @@ opt_in_rules:
- prefer_self_type_over_type_of_self # Prefer `Self` over `type(of: self)` when accessing properties or calling methods.
- prefer_zero_over_explicit_init # Prefer `.zero` over explicit init with zero parameters (e.g. `CGPoint(x: 0, y: 0)`).
- private_outlet # IBOutlets should be private to avoid leaking UIKit to higher layers.
- private_action # IBActions should be private.
- prohibited_super_call # Some methods should not call super, e.g. `UIViewController.loadView()`
- sorted_first_last # Prefer using `min()` or `max()` over `sorted().first` or `sorted().last`
- toggle_bool # Prefer `someBool.toggle()` over `someBool = !someBool`.
- unavailable_function # Unimplemented functions should be marked as unavailable.
- unused_import # All imported modules should be required to make the file compile.
- unused_optional_binding # Prefer `!= nil` over `let _ =`
- unused_declaration # Declarations should be referenced at least once within all files linted.