From 54bb41e5ff692d07078dd0ee7051449d28ae710b Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Wed, 22 Jan 2020 14:10:15 +0300 Subject: [PATCH] fix swiftlint issues --- LeadKit.xcodeproj/project.pbxproj | 6 +++--- .../PaginationDataLoadingModel.swift | 1 - build-scripts | 2 +- download_swiftlint.sh | 12 ------------ run_swiftlint.sh | 14 ++++++++++++++ 5 files changed, 18 insertions(+), 17 deletions(-) delete mode 100755 download_swiftlint.sh create mode 100644 run_swiftlint.sh diff --git a/LeadKit.xcodeproj/project.pbxproj b/LeadKit.xcodeproj/project.pbxproj index 423a6f06..010fe015 100644 --- a/LeadKit.xcodeproj/project.pbxproj +++ b/LeadKit.xcodeproj/project.pbxproj @@ -2300,7 +2300,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "CONFIG_PATH=${PROJECT_DIR}/build-scripts/xcode/.swiftlint.yml\n\n. ${PROJECT_DIR}/download_swiftlint.sh\n\n${PROJECT_DIR}/Downloads/swiftlint autocorrect --path ${PROJECT_DIR}/Sources --config ${CONFIG_PATH} && swiftlint --path ${PROJECT_DIR}/Sources --config ${CONFIG_PATH}\n"; + shellScript = ". run_swiftlint.sh\n"; }; 6782BBBC1EB31ED90086E0B8 /* SwiftLint */ = { isa = PBXShellScriptBuildPhase; @@ -2314,7 +2314,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "CONFIG_PATH=${PROJECT_DIR}/build-scripts/xcode/.swiftlint.yml\n\n. ${PROJECT_DIR}/download_swiftlint.sh\n\n${PROJECT_DIR}/Downloads/swiftlint autocorrect --path ${PROJECT_DIR}/Sources --config ${CONFIG_PATH} && swiftlint --path ${PROJECT_DIR}/Sources --config ${CONFIG_PATH}\n"; + shellScript = ". run_swiftlint.sh\n"; }; 6782BBBE1EB31F210086E0B8 /* SwiftLint */ = { isa = PBXShellScriptBuildPhase; @@ -2328,7 +2328,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "CONFIG_PATH=${PROJECT_DIR}/build-scripts/xcode/.swiftlint.yml\n\n. ${PROJECT_DIR}/download_swiftlint.sh\n\n${PROJECT_DIR}/Downloads/swiftlint autocorrect --path ${PROJECT_DIR}/Sources --config ${CONFIG_PATH} && swiftlint --path ${PROJECT_DIR}/Sources --config ${CONFIG_PATH}\n"; + shellScript = ". run_swiftlint.sh\n"; }; 67887A0E1ECC856F008A9E1D /* CopyPaste Detection */ = { isa = PBXShellScriptBuildPhase; diff --git a/Sources/Classes/DataLoading/PaginationDataLoading/PaginationDataLoadingModel.swift b/Sources/Classes/DataLoading/PaginationDataLoading/PaginationDataLoadingModel.swift index eb2f2d95..a74d00e7 100644 --- a/Sources/Classes/DataLoading/PaginationDataLoading/PaginationDataLoadingModel.swift +++ b/Sources/Classes/DataLoading/PaginationDataLoading/PaginationDataLoadingModel.swift @@ -23,7 +23,6 @@ import RxSwift /// Data loading model for PaginationDataLoadingState with ResettableRxDataSourceCursor as data source. -// swiftlint:disable:next colon public final class PaginationDataLoadingModel: RxDataLoadingModel> { diff --git a/build-scripts b/build-scripts index 12f908a0..1f83bf5d 160000 --- a/build-scripts +++ b/build-scripts @@ -1 +1 @@ -Subproject commit 12f908a01bdb26184a413d6d293ccd14d462645e +Subproject commit 1f83bf5d08bbc2c2346141621a42b2d2e0dd6517 diff --git a/download_swiftlint.sh b/download_swiftlint.sh deleted file mode 100755 index b731b364..00000000 --- a/download_swiftlint.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -SWIFTLINT_VERSION=0.31.0 -SWIFTLINT_PORTABLE_FILENAME=portable_swiftlint.zip - -SWIFTLINT_PORTABLE_URL=https://github.com/realm/SwiftLint/releases/download/${SWIFTLINT_VERSION}/${SWIFTLINT_PORTABLE_FILENAME} - -rm ${PROJECT_DIR}/Downloads/${SWIFTLINT_PORTABLE_FILENAME} - -. ${PROJECT_DIR}/build-scripts/xcode/aux_scripts/download_file.sh ${SWIFTLINT_PORTABLE_FILENAME} ${SWIFTLINT_PORTABLE_URL} - -cd Downloads && unzip -o ${SWIFTLINT_PORTABLE_FILENAME} \ No newline at end of file diff --git a/run_swiftlint.sh b/run_swiftlint.sh new file mode 100644 index 00000000..01c1db02 --- /dev/null +++ b/run_swiftlint.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +readonly CONFIG_PATH=${PROJECT_DIR}/build-scripts/xcode/.swiftlint.yml + +readonly SWIFTLINT_VERSION=0.31.0 +readonly SWIFTLINT_PORTABLE_FILENAME=portable_swiftlint.zip + +readonly SWIFTLINT_PORTABLE_URL=https://github.com/realm/SwiftLint/releases/download/${SWIFTLINT_VERSION}/${SWIFTLINT_PORTABLE_FILENAME} + +. build-scripts/xcode/aux_scripts/download_file.sh ${SWIFTLINT_PORTABLE_FILENAME} ${SWIFTLINT_PORTABLE_URL} Downloads --remove-cached + +cd Downloads && unzip -o ${SWIFTLINT_PORTABLE_FILENAME} + +${PROJECT_DIR}/Downloads/swiftlint autocorrect --path ${PROJECT_DIR}/Sources --config ${CONFIG_PATH} && ${PROJECT_DIR}/Downloads/swiftlint --path ${PROJECT_DIR}/Sources --config ${CONFIG_PATH} \ No newline at end of file