Skip to content

Commit

Permalink
Merge pull request #193 from uias/ci-linting
Browse files Browse the repository at this point in the history
Add Swiftlint config file to Danger
  • Loading branch information
msaps authored Feb 9, 2019
2 parents 51f1ee0 + 5fcac4f commit 95e4104
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions Dangerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ if (has_source_changes && ! has_tests_changes)
warn("Looks like you changed some source files, should there have been some tests added?")
end

swiftlint.config_file = 'Sources/.swiftlint.yml'
swiftlint.lint_files
14 changes: 7 additions & 7 deletions Sources/Pageboy/PageboyViewController+Management.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ internal extension PageboyViewController {
}

private func _updateViewControllers(to viewControllers: [UIViewController],
from fromIndex: PageIndex = 0,
to toIndex: PageIndex = 0,
direction: NavigationDirection = .forward,
animated: Bool,
async: Bool,
force: Bool,
completion: TransitionOperation.Completion?) {
from fromIndex: PageIndex = 0,
to toIndex: PageIndex = 0,
direction: NavigationDirection = .forward,
animated: Bool,
async: Bool,
force: Bool,
completion: TransitionOperation.Completion?) {

assert(Thread.isMainThread)

Expand Down
3 changes: 2 additions & 1 deletion Sources/Pageboy/PageboyViewController+Updating.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ extension PageboyViewController {
case .scrollTo(let index):
scrollToPage(.at(index: index), animated: true)

default: break
default:
break
}
}

Expand Down
2 changes: 2 additions & 0 deletions Sources/Pageboy/PageboyViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ public extension PageboyViewController {
}
}

//swiftlint:disable function_body_length

/// Scroll the page view controller to a new page.
///
/// - parameter page: The index of the new page.
Expand Down

0 comments on commit 95e4104

Please sign in to comment.