Skip to content

Commit 18694d7

Browse files
committed
Enable some extra rules and fix more warnings
t
1 parent d1c570e commit 18694d7

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

.swiftlint.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,30 @@
11
opt_in_rules:
2+
- anyobject_protocol
23
- array_init
34
- attributes
45
- closure_end_indentation
56
- closure_spacing
67
- contains_over_first_not_nil
8+
- convenience_type
79
- discouraged_optional_boolean
810
- discouraged_optional_collection
911
- empty_count
1012
- empty_string
13+
- fallthrough
1114
- fatal_error_message
1215
- first_where
1316
- force_unwrapping
1417
- implicit_return
1518
- implicitly_unwrapped_optional
1619
- joined_default_parameter
1720
- literal_expression_end_indentation
21+
- lower_acl_than_parent
22+
- modifier_order
1823
- multiline_arguments
24+
- multiline_function_chains
1925
- multiline_parameters
26+
- number_separator
27+
- object_literal
2028
- operator_usage_whitespace
2129
- overridden_super_call
2230
- override_in_extension
@@ -27,6 +35,7 @@ opt_in_rules:
2735
- sorted_first_last
2836
- sorted_imports
2937
- trailing_closure
38+
- unavailable_function
3039
- unneeded_parentheses_in_closure_argument
3140
- vertical_parameter_alignment_on_call
3241
- yoda_condition

Sources/StencilSwiftTemplate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ open class StencilSwiftTemplate: Template {
2121
}
2222

2323
// swiftlint:disable:next discouraged_optional_collection
24-
open override func render(_ dictionary: [String: Any]? = nil) throws -> String {
24+
override open func render(_ dictionary: [String: Any]? = nil) throws -> String {
2525
return try removeExtraLines(from: super.render(dictionary))
2626
}
2727

Tests/StencilSwiftKitTests/StringFiltersTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ final class StringFiltersTests: XCTestCase {
2929
return stringRepresentation.hashValue
3030
}
3131

32-
public static func == (lhs: Input, rhs: Input) -> Bool {
32+
static func == (lhs: Input, rhs: Input) -> Bool {
3333
return lhs.stringRepresentation == rhs.stringRepresentation
3434
}
3535
}

0 commit comments

Comments
 (0)