Skip to content

Commit

Permalink
Merge pull request #33 from ww-tech/sgrosmark/2021updates
Browse files Browse the repository at this point in the history
Bring project files up to date
  • Loading branch information
g-mark authored Feb 6, 2021
2 parents de0819a + 4cdf429 commit 8f816e5
Show file tree
Hide file tree
Showing 56 changed files with 377 additions and 170 deletions.
30 changes: 15 additions & 15 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
# Find all the available rules by running:
# swiftlint rules

# rules to exclude from running
disabled_rules:
disabled_rules: # rule identifiers to exclude from running
- identifier_name
- line_length
- no_extension_access_modifier
- statement_position # a.k.a. cuddled else
- statement_position
- shorthand_operator
- multiple_closures_with_trailing_closure

# rules that must run
opt_in_rules:
opt_in_rules: # some rules are only opt-in
- anyobject_protocol
- collection_alignment
- closure_spacing
Expand All @@ -34,6 +34,7 @@ opt_in_rules:
- empty_string
- empty_xctest_method
- explicit_init
- first_where
- force_cast
- force_try
- force_unwrapping
Expand All @@ -47,6 +48,7 @@ opt_in_rules:
- multiline_parameters
- no_space_in_method_call
- opening_brace
- operator_usage_whitespace
- overridden_super_call
- prohibited_super_call
- redundant_discardable_let
Expand All @@ -70,10 +72,6 @@ custom_rules:
name: "No space after opening parentheses"
message: "Please avoid using space after opening parentheses"
regex: '\(\h+'
no_space_before_closing_parentheses:
name: "No space before closing parentheses"
message: "Please avoid using space before closing parentheses"
regex: '\h+\)'

anonymous_init:
name: "Anonymous init()"
Expand Down Expand Up @@ -105,8 +103,6 @@ function_parameter_count:
warning: 6
error: 9

line_length: 160

nesting:
type_level:
warning: 3 # default is 1
Expand All @@ -116,18 +112,22 @@ trailing_whitespace:

type_body_length:
warning: 500 # default is 200
error: 600 # default is 350
error: 1000 # default is 350

unused_setter_value: error


#---
#--- Paths

#included: # paths to include during linting. `--path` is ignored if present.
# - ../Pod
# In ios-common-config, the path to the sources will be done via the --path argument

# excluded: # paths to ignore during linting. Takes precedence over `included`.
# - ./vendor
# - ./fastlane
excluded: # paths to ignore during linting. Takes precedence over `included`.
- ./Example/Pods
- ./Pods
- ./vendor
- ./fastlane

reporter: "xcode" # reporter type (xcode, json, csv, checkstyle, junit, html, emoji)
6 changes: 3 additions & 3 deletions Sources/WWLayout/Anchorable.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//
// Anchorable.swift
//
Expand All @@ -11,7 +11,7 @@
//
// https://github.com/ww-tech/wwlayout
//
// Copyright © 2017-2018 WW International, Inc.
// Copyright © 2017-2021 WW International, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//

import UIKit
Expand Down
6 changes: 3 additions & 3 deletions Sources/WWLayout/Insets.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//
// Insets.swift
//
Expand All @@ -11,7 +11,7 @@
//
// https://github.com/ww-tech/wwlayout
//
// Copyright © 2017-2018 WW International, Inc.
// Copyright © 2017-2021 WW International, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//

import UIKit
Expand Down
6 changes: 3 additions & 3 deletions Sources/WWLayout/Layout+Activate.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//
// Layout+Activate.swift
//
Expand All @@ -11,7 +11,7 @@
//
// https://github.com/ww-tech/wwlayout
//
// Copyright © 2017-2018 WW International, Inc.
// Copyright © 2017-2021 WW International, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//

import UIKit
Expand Down
6 changes: 3 additions & 3 deletions Sources/WWLayout/Layout+Center.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//
// Layout+Center.swift
//
Expand All @@ -11,7 +11,7 @@
//
// https://github.com/ww-tech/wwlayout
//
// Copyright © 2017-2018 WW International, Inc.
// Copyright © 2017-2021 WW International, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//

import UIKit
Expand Down
6 changes: 3 additions & 3 deletions Sources/WWLayout/Layout+Edges.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//
// Layout+Edges.swift
//
Expand All @@ -11,7 +11,7 @@
//
// https://github.com/ww-tech/wwlayout
//
// Copyright © 2017-2018 WW International, Inc.
// Copyright © 2017-2021 WW International, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//

import UIKit
Expand Down
26 changes: 21 additions & 5 deletions Sources/WWLayout/Layout+Fill.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//
// Layout+Fill.swift
//
Expand All @@ -11,7 +11,7 @@
//
// https://github.com/ww-tech/wwlayout
//
// Copyright © 2017-2018 WW International, Inc.
// Copyright © 2017-2021 WW International, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//

import UIKit
Expand Down Expand Up @@ -292,7 +292,15 @@ extension Layout {
priority: LayoutPriority? = nil,
tag: Int? = nil,
active: Bool? = nil) -> Layout {
return fillWidth(of: special.anchorable(with: view), inset: Insets(inset), maximum: maximum, alignTo: edge, priority: priority, tag: tag, active: active)
return fillWidth(
of: special.anchorable(with: view),
inset: Insets(inset),
maximum: maximum,
alignTo: edge,
priority: priority,
tag: tag,
active: active
)
}

/// Set the view so it fills the width of another view, with a maximum allowed width.
Expand All @@ -308,7 +316,15 @@ extension Layout {
priority: LayoutPriority? = nil,
tag: Int? = nil,
active: Bool? = nil) -> Layout {
return fillWidth(of: special.anchorable(with: view), inset: Insets(inset), maximum: maximum, alignTo: edge, priority: priority, tag: tag, active: active)
return fillWidth(
of: special.anchorable(with: view),
inset: Insets(inset),
maximum: maximum,
alignTo: edge,
priority: priority,
tag: tag,
active: active
)
}

}
6 changes: 3 additions & 3 deletions Sources/WWLayout/Layout+Size.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//
// Layout+Size.swift
//
Expand All @@ -11,7 +11,7 @@
//
// https://github.com/ww-tech/wwlayout
//
// Copyright © 2017-2018 WW International, Inc.
// Copyright © 2017-2021 WW International, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//

import UIKit
Expand Down
6 changes: 3 additions & 3 deletions Sources/WWLayout/Layout.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//
// Layout.swift
//
Expand All @@ -11,7 +11,7 @@
//
// https://github.com/ww-tech/wwlayout
//
// Copyright © 2017-2018 WW International, Inc.
// Copyright © 2017-2021 WW International, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//

import UIKit
Expand Down
6 changes: 3 additions & 3 deletions Sources/WWLayout/LayoutAnchor.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//
// LayoutAnchor.swift
//
Expand All @@ -11,7 +11,7 @@
//
// https://github.com/ww-tech/wwlayout
//
// Copyright © 2017-2018 WW International, Inc.
// Copyright © 2017-2021 WW International, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//

import UIKit
Expand Down
6 changes: 3 additions & 3 deletions Sources/WWLayout/LayoutAxis.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//
// LayoutAxis.swift
//
Expand All @@ -11,7 +11,7 @@
//
// https://github.com/ww-tech/wwlayout
//
// Copyright © 2017-2018 WW International, Inc.
// Copyright © 2017-2021 WW International, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//

import UIKit
Expand Down
6 changes: 3 additions & 3 deletions Sources/WWLayout/LayoutConstraint.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//
// LayoutConstraint.swift
//
Expand All @@ -11,7 +11,7 @@
//
// https://github.com/ww-tech/wwlayout
//
// Copyright © 2017-2018 WW International, Inc.
// Copyright © 2017-2021 WW International, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//

import UIKit
Expand Down
Loading

0 comments on commit 8f816e5

Please sign in to comment.