Skip to content

Commit

Permalink
Fix SwiftLint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bcylin committed May 24, 2020
1 parent f9240ba commit 23d95ae
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ disabled_rules:
- force_cast
- function_body_length
- identifier_name
- implicit_return
- line_length
- vertical_whitespace
opt_in_rules:
Expand All @@ -14,7 +15,6 @@ opt_in_rules:
- explicit_top_level_acl
- fatal_error_message
- first_where
- implicit_return
- implicitly_unwrapped_optional
- let_var_whitespace
- multiline_parameters
Expand Down
4 changes: 2 additions & 2 deletions Tests/ViewController/QuickTableViewDataSourceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import XCTest

internal final class QuickTableViewDataSourceTests: XCTestCase {

private var controller: QuickTableViewController!
private var controller: QuickTableViewController! // swiftlint:disable:this implicitly_unwrapped_optional

override func setUp() {
super.setUp()
Expand Down Expand Up @@ -252,7 +252,7 @@ internal final class QuickTableViewDataSourceTests: XCTestCase {
])
]

for index in [2, 3] {
for index in [2, 3] {
// When
let cell = controller.tableView(controller.tableView, cellForRowAt: IndexPath(row: index, section: 0))

Expand Down
2 changes: 1 addition & 1 deletion Tests/ViewController/QuickTableViewDelegateTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import XCTest

internal final class QuickTableViewDelegateTests: XCTestCase {

private var controller: QuickTableViewController!
private var controller: QuickTableViewController! // swiftlint:disable:this implicitly_unwrapped_optional

override func setUp() {
super.setUp()
Expand Down
8 changes: 4 additions & 4 deletions scripts/swiftlint.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/local/env ruby

not_ci = !ENV["TRAVIS"] || ENV["TRAVIS"]&.empty?
is_ci = !!ENV["CI"]

if not_ci
system "${PODS_ROOT}/SwiftLint/swiftlint --config .swiftlint.yml"
else
if is_ci
puts "Skip SwiftLint"
else
system "./Pods/SwiftLint/swiftlint --config .swiftlint.yml"
end

0 comments on commit 23d95ae

Please sign in to comment.