mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +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
@@ -3,7 +3,7 @@
|
|||||||
archiveVersion = 1;
|
archiveVersion = 1;
|
||||||
classes = {
|
classes = {
|
||||||
};
|
};
|
||||||
objectVersion = 52;
|
objectVersion = 51;
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
@@ -842,13 +842,6 @@
|
|||||||
path = Resources;
|
path = Resources;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
3180C73BA7B8F5F7447C99B0 /* React */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
);
|
|
||||||
path = React;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
328DD5DA1281F758B72006C7 /* Views */ = {
|
328DD5DA1281F758B72006C7 /* Views */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@@ -1493,7 +1486,6 @@
|
|||||||
E74CD7681375AD2EAA34D66B /* Authentication */,
|
E74CD7681375AD2EAA34D66B /* Authentication */,
|
||||||
4009BE2E791C16AC6EE39A7E /* BugReport */,
|
4009BE2E791C16AC6EE39A7E /* BugReport */,
|
||||||
B53CA9BECD3F97805E1432D0 /* HomeScreen */,
|
B53CA9BECD3F97805E1432D0 /* HomeScreen */,
|
||||||
3180C73BA7B8F5F7447C99B0 /* React */,
|
|
||||||
679E9837ECA8D6776079D16E /* RoomScreen */,
|
679E9837ECA8D6776079D16E /* RoomScreen */,
|
||||||
D958761758AA1110476DE6A3 /* SessionVerification */,
|
D958761758AA1110476DE6A3 /* SessionVerification */,
|
||||||
70B74A432C241E56A7ACE610 /* Settings */,
|
70B74A432C241E56A7ACE610 /* Settings */,
|
||||||
@@ -1659,12 +1651,12 @@
|
|||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = B15427F8699AD5A5FC75C17E /* Build configuration list for PBXNativeTarget "ElementX" */;
|
buildConfigurationList = B15427F8699AD5A5FC75C17E /* Build configuration list for PBXNativeTarget "ElementX" */;
|
||||||
buildPhases = (
|
buildPhases = (
|
||||||
B35AB66424BB30087EEE408C /* 🧹 SwiftFormat */,
|
|
||||||
A7130911BCB2DF3D249A1836 /* 🛠 SwiftGen */,
|
A7130911BCB2DF3D249A1836 /* 🛠 SwiftGen */,
|
||||||
9797D588420FCBBC228A63C9 /* Sources */,
|
9797D588420FCBBC228A63C9 /* Sources */,
|
||||||
215E1D91B98672C856F559D0 /* Resources */,
|
215E1D91B98672C856F559D0 /* Resources */,
|
||||||
EE878EAA342710DB973E0A87 /* Frameworks */,
|
EE878EAA342710DB973E0A87 /* Frameworks */,
|
||||||
98CA896D84BFD53B2554E891 /* ⚠️ SwiftLint */,
|
98CA896D84BFD53B2554E891 /* ⚠️ SwiftLint */,
|
||||||
|
B35AB66424BB30087EEE408C /* 🧹 SwiftFormat */,
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
@@ -1903,7 +1895,7 @@
|
|||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "export PATH=\"$PATH:/opt/homebrew/bin\"\nif which swiftformat >/dev/null; then\n swiftformat $PROJECT_DIR\nelse\n echo \"warning: SwiftFormat not installed, download from https://github.com/nicklockwood/SwiftFormat\"\nfi\n";
|
shellScript = "export PATH=\"$PATH:/opt/homebrew/bin\"\nif which swiftformat >/dev/null; then\n if [ $CONFIGURATION = \"Debug\" ]; then \n swiftformat --lint --lenient \"$PROJECT_DIR\"\n else \n swiftformat --lint \"$PROJECT_DIR\"\n fi\nelse\n echo \"warning: SwiftFormat not installed, download from https://github.com/nicklockwood/SwiftFormat\"\nfi\n";
|
||||||
};
|
};
|
||||||
/* End PBXShellScriptBuildPhase section */
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
|
|||||||
@@ -58,16 +58,6 @@ targets:
|
|||||||
SWIFT_OBJC_BRIDGING_HEADER: ElementX/SupportingFiles/ElementX-Bridging-Header.h
|
SWIFT_OBJC_BRIDGING_HEADER: ElementX/SupportingFiles/ElementX-Bridging-Header.h
|
||||||
|
|
||||||
preBuildScripts:
|
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
|
- name: 🛠 SwiftGen
|
||||||
runOnlyWhenInstalling: false
|
runOnlyWhenInstalling: false
|
||||||
shell: /bin/sh
|
shell: /bin/sh
|
||||||
@@ -91,6 +81,21 @@ targets:
|
|||||||
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
|
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
|
||||||
fi
|
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:
|
dependencies:
|
||||||
- package: MatrixRustSDK
|
- package: MatrixRustSDK
|
||||||
- package: DesignKit
|
- package: DesignKit
|
||||||
|
|||||||
Reference in New Issue
Block a user