Permalink
Browse files

Add swiftlint build phase

  • Loading branch information...
freak4pc authored and kzaher committed Jan 6, 2019
1 parent cace5d0 commit 3bf312c1842562d2d9df12afecad46b72e6c545b
Showing with 96 additions and 6 deletions.
  1. +34 −2 .swiftlint.yml
  2. +61 −3 Rx.xcodeproj/project.pbxproj
  3. +1 −1 RxCocoa/Traits/Driver/ControlProperty+Driver.swift
@@ -1,7 +1,39 @@
included:
- Sources
- RxSwift
- RxCocoa
- RxTest
- RxBlocking
opt_in_rules:
- overridden_super_call
- private_outlet
- prohibited_super_call
- first_where
- closure_spacing
- unneeded_parentheses_in_closure_argument
- redundant_nil_coalescing
- pattern_matching_keywords
- explicit_init
- contains_over_first_not_nil
disabled_rules:
- line_length
- trailing_whitespace
- type_name

- identifier_name
- vertical_whitespace
- trailing_newline
- opening_brace
- large_tuple
- file_length
- comma
- colon
- private_over_fileprivate
- force_cast
- force_try
- function_parameter_count
- statement_position
- legacy_hashing
- todo
- operator_whitespace
- type_body_length
- function_body_length
- cyclomatic_complexity
@@ -2472,6 +2472,7 @@
isa = PBXNativeTarget;
buildConfigurationList = C80939691B8A71760088E94D /* Build configuration list for PBXNativeTarget "RxCocoa" */;
buildPhases = (
A21D625B21E1D80F00E3E359 /* SwiftLint */,
C80939641B8A71760088E94D /* Headers */,
C80938F61B8A71760088E94D /* Sources */,
C80939681B8A71760088E94D /* Resources */,
@@ -2491,6 +2492,7 @@
isa = PBXNativeTarget;
buildConfigurationList = C8093BC31B8A71F00088E94D /* Build configuration list for PBXNativeTarget "RxBlocking" */;
buildPhases = (
A21D625C21E1D82B00E3E359 /* SwiftLint */,
C8093BBA1B8A71F00088E94D /* Headers */,
C8093B4C1B8A71F00088E94D /* Sources */,
C8093BBE1B8A71F00088E94D /* Resources */,
@@ -2609,6 +2611,7 @@
isa = PBXNativeTarget;
buildConfigurationList = C88FA5081C25C44800CCFEA4 /* Build configuration list for PBXNativeTarget "RxTest" */;
buildPhases = (
A21D625D21E1D83800E3E359 /* SwiftLint */,
C88FA5061C25C44800CCFEA4 /* Headers */,
C88FA5001C25C44800CCFEA4 /* Sources */,
C88FA5071C25C44800CCFEA4 /* Resources */,
@@ -2628,11 +2631,11 @@
isa = PBXNativeTarget;
buildConfigurationList = C8A56AED1AD7424700B4673B /* Build configuration list for PBXNativeTarget "RxSwift" */;
buildPhases = (
A21F589121E109AD0051AEA2 /* SwiftLint */,
C8A56AD41AD7424700B4673B /* Headers */,
C8A56AD21AD7424700B4673B /* Sources */,
C8A56AD51AD7424700B4673B /* Resources */,
C8A56AD31AD7424700B4673B /* Frameworks */,
A21F589121E109AD0051AEA2 /* ShellScript */,
);
buildRules = (
);
@@ -2812,7 +2815,7 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
A21F589121E109AD0051AEA2 /* ShellScript */ = {
A21D625B21E1D80F00E3E359 /* SwiftLint */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -2821,13 +2824,68 @@
);
inputPaths = (
);
name = SwiftLint;
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint is installed\"\nfi\n";
shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint is not installed\"\nfi\n\n";
};
A21D625C21E1D82B00E3E359 /* SwiftLint */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = SwiftLint;
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint is not installed\"\nfi\n\n";
};
A21D625D21E1D83800E3E359 /* SwiftLint */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = SwiftLint;
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint is not installed\"\nfi\n\n";
};
A21F589121E109AD0051AEA2 /* SwiftLint */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = SwiftLint;
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint is not installed\"\nfi\n";
};
/* End PBXShellScriptBuildPhase section */

@@ -13,7 +13,7 @@ extension ControlProperty {
///
/// `ControlProperty` already can't fail, so no special case needs to be handled.
public func asDriver() -> Driver<E> {
return self.asDriver { error -> Driver<E> in
return self.asDriver { _ -> Driver<E> in
#if DEBUG
rxFatalError("Somehow driver received error from a source that shouldn't fail.")
#else

0 comments on commit 3bf312c

Please sign in to comment.