fix swiftlint

This commit is contained in:
Ivan Smolin 2020-01-22 14:12:35 +03:00
parent 4fd075cbc8
commit 131d3c7b78
4 changed files with 16 additions and 14 deletions

View File

@ -369,7 +369,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";
};
/* End PBXShellScriptBuildPhase section */

@ -1 +1 @@
Subproject commit 54935bbe26063cdf04e72b8cb76d61c727ff99a7
Subproject commit 1f83bf5d08bbc2c2346141621a42b2d2e0dd6517

View File

@ -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}

14
run_swiftlint.sh Normal file
View File

@ -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}