iOS swift sonarQube命令。/run-sonar-swift.sh-v投掷错误
嗨,当我为iOS SonarQube运行以下命令时,我得到以下错误 命令:iOS swift sonarQube命令。/run-sonar-swift.sh-v投掷错误,ios,swift,ruby,sonarqube,Ios,Swift,Ruby,Sonarqube,嗨,当我为iOS SonarQube运行以下命令时,我得到以下错误 命令:/run-sonar-swift.sh-v 错误: Executed 2 tests, with 0 failures (0 unexpected) in 0.333 (0.335) seconds .. Executed 2 tests, with 0 failures (0 unexpected) in 24.284 (24.289) seconds \nComputing coverage re
/run-sonar-swift.sh-v
错误:
Executed 2 tests, with 0 failures (0 unexpected) in 0.333 (0.335) seconds
..
Executed 2 tests, with 0 failures (0 unexpected) in 24.284 (24.289) seconds
\nComputing coverage report\n
Command line exclusion flags for slather is:
slather coverage --binary-basename SonarDemoApp --input-format profdata --cobertura-xml --output-directory sonar-reports --workspace SonarDemoApp.xcworkspace --scheme SonarDemoApp SonarDemoApp.xcodeproj
+ slather coverage --binary-basename SonarDemoApp --input-format profdata --cobertura-xml --output-directory sonar-reports --workspace SonarDemoApp.xcworkspace --scheme SonarDemoApp SonarDemoApp.xcodeproj
Slathering...
<internal:/usr/local/Cellar/ruby/3.0.1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- rexml/document (LoadError)
from <internal:/usr/local/Cellar/ruby/3.0.1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /usr/local/Cellar/gem-slather/2.7.0/gems/xcodeproj-1.19.0/lib/xcodeproj/scheme.rb:1:in `<top (required)>'
from <internal:/usr/local/Cellar/ruby/3.0.1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/usr/local/Cellar/ruby/3.0.1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /usr/local/Cellar/gem-slather/2.7.0/gems/slather-2.7.0/lib/slather/project.rb:481:in `find_binary_files'
from /usr/local/Cellar/gem-slather/2.7.0/gems/slather-2.7.0/lib/slather/project.rb:451:in `configure_binary_file'
from /usr/local/Cellar/gem-slather/2.7.0/gems/slather-2.7.0/lib/slather/project.rb:331:in `configure'
from /usr/local/Cellar/gem-slather/2.7.0/gems/slather-2.7.0/lib/slather/command/coverage_command.rb:59:in `execute'
from /usr/local/Cellar/gem-slather/2.7.0/gems/clamp-1.3.2/lib/clamp/command.rb:66:in `run'
from /usr/local/Cellar/gem-slather/2.7.0/gems/clamp-1.3.2/lib/clamp/subcommand/execution.rb:18:in `execute'
from /usr/local/Cellar/gem-slather/2.7.0/gems/clamp-1.3.2/lib/clamp/command.rb:66:in `run'
from /usr/local/Cellar/gem-slather/2.7.0/gems/clamp-1.3.2/lib/clamp/command.rb:140:in `run'
from /usr/local/Cellar/gem-slather/2.7.0/gems/slather-2.7.0/bin/slather:17:in `<top (required)>'
from /usr/local/bin/slather:6:in `load'
from /usr/local/bin/slather:6:in `<main>'
+ returnValue=1
+ set +x
ERROR - Command 'slather coverage --binary-basename SonarDemoApp --input-format profdata --cobertura-xml --output-directory sonar-reports --workspace SonarDemoApp.xcworkspace --scheme SonarDemoApp SonarDemoApp.xcodeproj' failed with error code: 1
在上面的错误中寻找一些帮助
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install ruby
echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile