File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -238,19 +238,20 @@ if [ $isFramework = true ]; then
238238 merge_swiftlint_configuration " swiftlint+frameworks.yml" " $tmpFile " " --write-to-file" " $tmpFile .frameworks"
239239 mv " $tmpFile .frameworks" " $tmpFile "
240240
241+ # Find the unit test directory
241242 if [ -e " $projectDir /Unit-Tests" ]; then
242- if [ -f " $projectDir /Unit-Tests/.project-swiftlint.yml" ]; then
243- rm " $projectDir /Unit-Tests/.swiftlint.yml"
244- merge_swiftlint_configuration " $projectDir /Unit-Tests/.project-swiftlint.yml" " swiftlint+frameworksUnitTest.yml" " --write-to-file" " $projectDir /Unit-Tests/.swiftlint.yml"
245- else
246- cp " swiftlint+frameworksUnitTest.yml" " $projectDir /Unit-Tests/.swiftlint.yml"
247- fi
243+ unitTestDir=" $projectDir /Unit-Tests"
248244 elif [ -e " $projectDir /UnitTests" ]; then
249- if [ -f " $projectDir /UnitTests/.project-swiftlint.yml" ]; then
250- rm " $projectDir /UnitTests/.swiftlint.yml"
251- merge_swiftlint_configuration " $projectDir /UnitTests/.project-swiftlint.yml" " swiftlint+frameworksUnitTest.yml" " --write-to-file" " $projectDir /UnitTests/.swiftlint.yml"
245+ unitTestDir=" $projectDir /UnitTests"
246+ fi
247+
248+ if [ -e $unitTestDir ]; then
249+ # Deals with swiftlint for unit tests
250+ if [ -f " $unitTestDir /.project-swiftlint.yml" ]; then
251+ rm " $unitTestDir /.swiftlint.yml"
252+ merge_swiftlint_configuration " $unitTestDir /.project-swiftlint.yml" " swiftlint+frameworksUnitTest.yml" " --write-to-file" " $unitTestDir /.swiftlint.yml"
252253 else
253- cp " swiftlint+frameworksUnitTest.yml" " $projectDir /UnitTests /.swiftlint.yml"
254+ cp " swiftlint+frameworksUnitTest.yml" " $unitTestDir /.swiftlint.yml"
254255 fi
255256 fi
256257fi
You can’t perform that action at this time.
0 commit comments