Skip to content

Commit 4434f57

Browse files
authored
Merge pull request #29 from BoltsFramework/nlutsenko.lint
Add swiftlint to Travis-CI.
2 parents c7a85a3 + 21af7b5 commit 4434f57

2 files changed

Lines changed: 17 additions & 10 deletions

File tree

.travis.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,21 @@ env:
1111
- TEST_TYPE=iOS
1212
- TEST_TYPE=OSX
1313
- TEST_TYPE=tvOS
14-
- TEST_TYPE=CocoaPods
15-
- TEST_TYPE=Carthage
14+
- TEST_TYPE=Lint
15+
- TEST_TYPE=Distribution
1616
before_install:
17+
- |
18+
if [ "$TEST_TYPE" = Lint ] || [ "$TEST_TYPE" = Distribution ]; then
19+
brew update
20+
fi
21+
install:
1722
- |
1823
if [ "$TEST_TYPE" = iOS ] || [ "$TEST_TYPE" = OSX ] || [ "$TEST_TYPE" = tvOS ]; then
1924
gem install xcpretty -N --no-ri --no-rdoc
20-
elif [ "$TEST_TYPE" = CocoaPods ]; then
25+
elif [ "$TEST_TYPE" = Lint ]; then
26+
brew install swiftlint || brew upgrade swiftlint
27+
elif [ "$TEST_TYPE" = Distribution ]; then
2128
gem install cocoapods --pre --quiet --no-ri --no-rdoc
22-
pod setup --silent
23-
pod repo update --silent
24-
elif [ "$TEST_TYPE" = Carthage ]; then
25-
brew update
2629
brew install carthage || brew upgrade carthage
2730
fi
2831
script:
@@ -39,9 +42,10 @@ script:
3942
set -o pipefail
4043
xcodebuild test -project BoltsSwift.xcodeproj -sdk appletvsimulator -scheme BoltsSwift-tvOS -destination "platform=tvOS Simulator,name=Apple TV 1080p" -configuration Debug GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c
4144
xcodebuild test -project BoltsSwift.xcodeproj -sdk appletvsimulator -scheme BoltsSwift-tvOS -destination "platform=tvOS Simulator,name=Apple TV 1080p" -configuration Release GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c
42-
elif [ "$TEST_TYPE" = CocoaPods ]; then
45+
elif [ "$TEST_TYPE" = Lint ]; then
46+
swiftlint lint
47+
elif [ "$TEST_TYPE" = Distribution ]; then
4348
pod lib lint Bolts-Swift.podspec
44-
elif [ "$TEST_TYPE" = Carthage ]; then
4549
carthage build --no-skip-current
4650
fi
4751
after_success:

Sources/BoltsSwift/Task+ContinueWith.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ extension Task {
2323

2424
- returns: The task resulting from the continuation
2525
*/
26-
private func continueWithTask<S>(executor: Executor, options: TaskContinuationOptions, continuation: (Task throws -> Task<S>)) -> Task<S> {
26+
private func continueWithTask<S>(executor: Executor,
27+
options: TaskContinuationOptions,
28+
continuation: (Task throws -> Task<S>)
29+
) -> Task<S> {
2730
let taskCompletionSource = TaskCompletionSource<S>()
2831
let wrapperContinuation = {
2932
switch self.state {

0 commit comments

Comments
 (0)