mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Switch SwiftFormat to lint mode and have it be lenient on local builds but fail on the CI
This commit is contained in:
committed by
Stefan Ceriu
parent
65c35498bd
commit
922e037786
@@ -58,16 +58,6 @@ targets:
|
||||
SWIFT_OBJC_BRIDGING_HEADER: ElementX/SupportingFiles/ElementX-Bridging-Header.h
|
||||
|
||||
preBuildScripts:
|
||||
- name: 🧹 SwiftFormat
|
||||
runOnlyWhenInstalling: false
|
||||
shell: /bin/sh
|
||||
script: |
|
||||
export PATH="$PATH:/opt/homebrew/bin"
|
||||
if which swiftformat >/dev/null; then
|
||||
swiftformat $PROJECT_DIR
|
||||
else
|
||||
echo "warning: SwiftFormat not installed, download from https://github.com/nicklockwood/SwiftFormat"
|
||||
fi
|
||||
- name: 🛠 SwiftGen
|
||||
runOnlyWhenInstalling: false
|
||||
shell: /bin/sh
|
||||
@@ -90,6 +80,21 @@ targets:
|
||||
else
|
||||
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
|
||||
fi
|
||||
|
||||
- name: 🧹 SwiftFormat
|
||||
runOnlyWhenInstalling: false
|
||||
shell: /bin/sh
|
||||
script: |
|
||||
export PATH="$PATH:/opt/homebrew/bin"
|
||||
if which swiftformat >/dev/null; then
|
||||
if [ $CONFIGURATION = "Debug" ]; then
|
||||
swiftformat --lint --lenient "$PROJECT_DIR"
|
||||
else
|
||||
swiftformat --lint "$PROJECT_DIR"
|
||||
fi
|
||||
else
|
||||
echo "warning: SwiftFormat not installed, download from https://github.com/nicklockwood/SwiftFormat"
|
||||
fi
|
||||
|
||||
dependencies:
|
||||
- package: MatrixRustSDK
|
||||
|
||||
Reference in New Issue
Block a user