@@ -17,6 +17,7 @@ readonly noXcodeCheck="--no-xcodecheck"
1717readonly buildConfigurationFlag=" --buildconfig"
1818readonly targetTypeFlag=" --targettype"
1919readonly breakingInternalFrameworkVersioningFlag=" --use-breaking-internal-framework-versioning"
20+ readonly swiftUIFlag=" --SwiftUI"
2021
2122readonly scriptBaseFolderPath=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
2223
@@ -33,6 +34,7 @@ callCodeClimate=true
3334checkXcodeVersion=true
3435projectDir=" $( pwd) "
3536isDebugConfiguration=false
37+ isSwiftUIProject=false
3638
3739#
3840# Methods
@@ -45,6 +47,7 @@ function display_usage () {
4547 echo -e " $noCodebeatFlag \t\t\t\t- Don't copy the default SMF codebeat configuration"
4648 echo -e " $noCodeClimateFlag \t\t\t- Don't copy the default SMF Code Climate configuration"
4749 echo -e " $breakingInternalFrameworkVersioningFlag \t -Use the \" BreakingInternal framework versioning system\" (only for frameworks)"
50+ echo -e " $swiftUIFlag \t\t\t\t- Use custom SwiftLint rules for swift ui projects"
4851 echo -e " \nUsage:\n$ $0 $noCodebeatFlag "
4952 echo -e " or:\n$ $0 $noCodebeatFlag /Code/Project/Test"
5053}
@@ -93,6 +96,11 @@ while test $# -gt 0; do
9396 shift
9497 # break
9598 ;;
99+ $swiftUIFlag )
100+ isSwiftUIProject=true
101+ shift
102+ # break
103+ ;;
96104 $noCodeClimateFlag )
97105 callCodeClimate=false
98106 shift
@@ -123,7 +131,7 @@ cd "$scriptBaseFolderPath"
123131#
124132
125133if [ $callSwiftlint = true ]; then
126- ./SwiftLint/copy-and-run-swiftlint-config.sh " $projectDir " $isFramework || exit 1;
134+ ./SwiftLint/copy-and-run-swiftlint-config.sh " $projectDir " $isFramework $isSwiftUIProject || exit 1;
127135fi
128136
129137if [ $callCodebeat = true ]; then
0 commit comments