mirror of
https://github.com/inspec/inspec
synced 2024-11-10 15:14:23 +00:00
Merge pull request #5872 from inspec/cw/set-coverage-location
CFINSPEC-39 Set sonarscanner options using properties file
This commit is contained in:
commit
275eb2b2f9
2 changed files with 15 additions and 2 deletions
|
@ -61,10 +61,15 @@ if [ -n "${CI_ENABLE_COVERAGE:-}" ]; then
|
|||
export PATH=$SONAR_SCANNER_HOME/bin:$PATH
|
||||
export SONAR_SCANNER_OPTS="-server"
|
||||
|
||||
# Delete the vendor/ directory. I've tried to exclude it using sonar.exclusions,
|
||||
# but that appears to get ignored, and we end up analyzing the gemfile install
|
||||
# which blows our analysis.
|
||||
echo "--- deleting installed gems"
|
||||
rm -rf vendor/
|
||||
|
||||
# See sonar-project.properties for additional settings
|
||||
echo "--- running sonarscanner"
|
||||
sonar-scanner \
|
||||
-Dsonar.organization=inspec \
|
||||
-Dsonar.projectKey=inspec_inspec \
|
||||
-Dsonar.sources=. \
|
||||
-Dsonar.host.url=https://sonarcloud.io
|
||||
fi
|
||||
|
|
8
sonar-project.properties
Normal file
8
sonar-project.properties
Normal file
|
@ -0,0 +1,8 @@
|
|||
sonar.ruby.coverage.reportPaths=coverage/coverage.json
|
||||
sonar.projectKey=inspec_inspec
|
||||
sonar.organization=inspec
|
||||
sonar.coverage.exclusions=test/*,lib/plugins/*/test/*
|
||||
sonar.exclusions=**/*.java,**/*.js,vendor/*
|
||||
sonar.c.file.suffixes=-
|
||||
sonar.cpp.file.suffixes=-
|
||||
sonar.objc.file.suffixes=-
|
Loading…
Reference in a new issue