./run-sonar-swift.sh: line 101: slather: command not found

./run-sonar-swift.sh -v

Running run-sonar-swift.sh…

Project count is [1]

2022-02-02 14:07:14.315 defaults[40410:379841]

The domain/default pair of (/Users/sathishkumar/Desktop/fi-mobile-ios/FirstInsight/Info.plist, CFBundleShortVersionString) does not exist

Xcode project file is: FirstInsight.xcodeproj

Xcode workspace file is: FirstInsight.xcworkspace

Xcode application scheme is: FirstInsight

Number version from plist is:

Destination simulator is: platform=iOS Simulator,name=iPhone 7 Plus,OS=15.0

Excluded paths from coverage are:

Creating directory sonar-reports/

Extracting Xcode project information

  • xcodebuild clean build -workspace FirstInsight.xcworkspace -scheme FirstInsight -destination ‘platform=iOS Simulator,name=iPhone 7 Plus,OS=15.0’ -destination-timeout 360 COMPILER_INDEX_STORE_ENABLE=NO

  • returnValue=0

  • set +x

./run-sonar-swift.sh: line 292: xcpretty: command not found

stat: compile_commands.json: stat: No such file or directory

actual = , min = 3

./run-sonar-swift.sh: line 300: [: -ge: unary operator expected

Running surefire

  • xcodebuild clean build test -workspace FirstInsight.xcworkspace -scheme FirstInsight -configuration Debug -enableCodeCoverage YES -destination ‘platform=iOS Simulator,name=iPhone 7 Plus,OS=15.0’ -destination-timeout 60

2022-02-02 14:13:31.487 xcodebuild[41753:387735] [MT] IDETestOperationsObserverDebug: 132.633 elapsed – Testing started completed.

2022-02-02 14:13:31.487 xcodebuild[41753:387735] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec – start

2022-02-02 14:13:31.487 xcodebuild[41753:387735] [MT] IDETestOperationsObserverDebug: 132.633 sec, +132.633 sec – end

  • returnValue=0

  • set +x

./run-sonar-swift.sh: line 324: xcpretty: command not found

mv: build/reports/junit.xml: No such file or directory

\nComputing coverage report\n

Command line exclusion flags for slather is:

slather coverage --binary-basename FirstInsight --input-format profdata --cobertura-xml --output-directory sonar-reports --workspace FirstInsight.xcworkspace --scheme FirstInsight FirstInsight.xcodeproj

  • slather coverage --binary-basename FirstInsight --input-format profdata --cobertura-xml --output-directory sonar-reports --workspace FirstInsight.xcworkspace --scheme FirstInsight FirstInsight.xcodeproj

./run-sonar-swift.sh: line 101: slather: command not found

  • returnValue=127

  • set +x

ERROR - Command ‘slather coverage --binary-basename FirstInsight --input-format profdata --cobertura-xml --output-directory sonar-reports --workspace FirstInsight.xcworkspace --scheme FirstInsight FirstInsight.xcodeproj’ failed with error code: 127

sathishkumar@Sathishs-MacBook-Pro fi-mobile-ios % ./run-sonar-swift.sh -v

Hey there.

It looks like this script comes from the community-supported Idean/sonar-swift plugin – which is not developed, maintained or supported by SonarSource. I would suggest reaching out to the maintainer on their GitHub repository.

1 Like

issue resolved thnaks colin

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.