SwiftLint: stricter and autocorrect
Adds `swiftlint autocorrect` in build phase and
adds more swiftlint rules, fixes them in the
project.
Change-Id: Iab5da451a75bfe0e1609a3549871d028691477d4
Gitlab: #90
diff --git a/Ring/.swiftlint.yml b/Ring/.swiftlint.yml
index 4d1bf6a..25c0f54 100644
--- a/Ring/.swiftlint.yml
+++ b/Ring/.swiftlint.yml
@@ -2,7 +2,28 @@
- todo
opt_in_rules: # some rules are only opt-in
- - empty_count
+ - closure_spacing # can be autocorrected
+ - closure_end_indentation
+ - literal_expression_end_indentation
+ - operator_usage_whitespace
+ - unused_import
+ - explicit_self
+ - modifier_order
+ - toggle_bool
+ - empty_count # can't be autocorrected
+ #- multiline_function_chains
+ #- closing_brace_spacing
+ #- closure_body_length
+ #- unused_declaration
+ #- vertical_parameter_alignment_on_call
+ #- collection_alignment
+ #- identical_operands
+ #- let_var_whitespace
+ #- attributes
+ #- lower_acl_than_parent
+ #- strict_fileprivate
+ #- overridden_super_call
+ #- unowned_variable_capture
excluded: # paths to ignore during linting. Takes precedence over `included`.
- Carthage
@@ -14,6 +35,10 @@
force_try:
severity: warning # explicitly
+#closure_body_length:
+ #- 60 # warning
+ #- 287 # error
+
type_body_length:
- 300 # warning
- 400 # error