Skip to content

Commit

Permalink
add swiftlint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
g-Off committed Jul 2, 2019
1 parent b788cb5 commit c6e2329
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 1 deletion.
59 changes: 59 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
whitelist_rules:
- array_init
- block_based_kvo
- closing_brace
- closure_parameter_position
- closure_spacing
- colon
- comma
- control_statement
- custom_rules
- discarded_notification_center_observer
- discouraged_direct_init
- dynamic_inline
- empty_enum_arguments
- empty_parameters
- empty_parentheses_with_trailing_closure
- explicit_init
- implicit_getter
- is_disjoint
- joined_default_parameter
- leading_whitespace
- legacy_cggeometry_functions
- legacy_constant
- legacy_constructor
- legacy_nsgeometry_functions
- mark
- multiline_parameters
- nimble_operator
- opening_brace
- operator_usage_whitespace
- overridden_super_call
- private_action
- private_over_fileprivate
- private_unit_test
- prohibited_super_call
- protocol_property_accessors_order
- quick_discouraged_call
- quick_discouraged_focused_test
- quick_discouraged_pending_test
- redundant_discardable_let
- redundant_nil_coalescing
- redundant_string_enum_value
- redundant_void_return
- required_enum_case
- return_arrow_whitespace
- single_test_class
- statement_position
- switch_case_alignment
- trailing_newline
- trailing_semicolon
- unneeded_break_in_switch
- unused_enumerated
- unused_optional_binding
- valid_ibinspectable
- vertical_whitespace
- void_return
- weak_delegate
- yoda_condition
2 changes: 1 addition & 1 deletion Sources/XcodeProject/Archiving/PBXPListArchiver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ final class ObjectVisitor {
private var objectMap: [PBXGlobalID: PBXObject] = [:]
private var visited = Set<PBXGlobalID>()

func visit(object: PBXObject?, where predicate: @escaping (_ object: PBXObject) -> Bool = { _ in return true}) {
func visit(object: PBXObject?, where predicate: @escaping (_ object: PBXObject) -> Bool = { _ in return true }) {
guard let object = object else { return }
guard !visited.contains(object.globalID) else { return }
if predicate(object) {
Expand Down

0 comments on commit c6e2329

Please sign in to comment.