From bebcc8b2d8ac86094c17071266361a3a627609ae Mon Sep 17 00:00:00 2001 From: Marcelo Fabri Date: Sat, 8 Sep 2018 20:25:45 -0700 Subject: [PATCH] Enable some opt-in rules --- .swiftlint.yml | 9 +++++++++ Tests/SwiftLintFrameworkTests/ConfigurationTests.swift | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.swiftlint.yml b/.swiftlint.yml index ee96acfd495..f5fa023bf86 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -7,14 +7,18 @@ analyzer_rules: - unused_import - unused_private_declaration opt_in_rules: + - anyobject_protocol - array_init - attributes - closure_end_indentation - closure_spacing - contains_over_first_not_nil - empty_count + - empty_string + - empty_xctest_method - explicit_init - extension_access_modifier + - fallthrough - fatal_error_message - file_header - file_name @@ -22,6 +26,7 @@ opt_in_rules: - joined_default_parameter - let_var_whitespace - literal_expression_end_indentation + - lower_acl_than_parent - nimble_operator - number_separator - object_literal @@ -31,15 +36,19 @@ opt_in_rules: - pattern_matching_keywords - private_action - private_outlet + - prohibited_interface_builder - prohibited_super_call - quick_discouraged_call - quick_discouraged_focused_test - quick_discouraged_pending_test - redundant_nil_coalescing + - redundant_type_annotation - single_test_class - sorted_first_last - sorted_imports + - unavailable_function - unneeded_parentheses_in_closure_argument + - untyped_error_in_catch - vertical_parameter_alignment_on_call - yoda_condition - identical_operands diff --git a/Tests/SwiftLintFrameworkTests/ConfigurationTests.swift b/Tests/SwiftLintFrameworkTests/ConfigurationTests.swift index 81a77efb1f0..57e4f238e6a 100644 --- a/Tests/SwiftLintFrameworkTests/ConfigurationTests.swift +++ b/Tests/SwiftLintFrameworkTests/ConfigurationTests.swift @@ -155,7 +155,7 @@ class ConfigurationTests: XCTestCase { return [] } - public func modificationDate(forFileAtPath path: String) -> Date? { + func modificationDate(forFileAtPath path: String) -> Date? { return nil } }