SonarQube扫描仪执行期间出错,SCM提供程序自动检测失败

SonarQube扫描仪执行期间出错,SCM提供程序自动检测失败,sonarqube,sonar-runner,Sonarqube,Sonar Runner,我正在osx中使用和设置sonar。我正在使用sonar 6.1、sonar runner 2.8和backelite-sonar-swift-plugin-0.2.4.jar文件。运行/run sonar swift.sh后,它会给出以下错误。我正在使用mysql数据库。Sonar与DB连接并创建所有表,但最终出现错误 Done linting! Found 34 violations, 2 serious in 4 files. Running Lizard.....Running Sona

我正在osx中使用和设置sonar。我正在使用sonar 6.1、sonar runner 2.8和backelite-sonar-swift-plugin-0.2.4.jar文件。运行
/run sonar swift.sh
后,它会给出以下错误。我正在使用mysql数据库。Sonar与DB连接并创建所有表,但最终出现错误

Done linting! Found 34 violations, 2 serious in 4 files.
Running Lizard.....Running SonarQube using SonarQube Runner..WARN: Property 'sonar.jdbc.url' is not supported any more. It will be ignored. There is no longer any DB connection to the SQ database.
WARN: Property 'sonar.jdbc.username' is not supported any more. It will be ignored. There is no longer any DB connection to the SQ database.
WARN: Property 'sonar.jdbc.password' is not supported any more. It will be ignored. There is no longer any DB connection to the SQ database.
....WARN: SCM provider autodetection failed. No SCM provider claims to support this project. Please use sonar.scm.provider to define SCM of your project.
.ERROR: Error during SonarQube Scanner execution
ERROR: File [moduleKey=abc.Krish, relative=KrishTests/KrishTests.swift, basedir=/Users/vjayah1/Desktop/Krish] can't be indexed twice. Please check that inclusion/exclusion patterns produce disjoint sets for main and test files
ERROR: 
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
ERROR - Command 'sonar-runner ' failed with error code: 1
sonar-runner.properties(/usr/local/ceral/sonar runner/2.8/libexec/conf)

sonar.properties文件(/usr/local/ceral/sonarqube/6.1/libexec/conf)


这是一个配置问题:

# Path to source directories
sonar.sources=/Users/vjayah1/Desktop/Krish
# Path to test directories (comment if no test)
sonar.tests=/Users/vjayah1/Desktop/Krish/KrishTests
源文件夹以递归方式编制索引。因此
/Users/vjayah1/Desktop/Krish
也将包含
/Users/vjayah1/Desktop/Krish/KrishTests

您应该从主要源中排除测试文件夹:

sonar.exclusions=/Users/vjayah1/Desktop/Krish/KrishTests/**/*

“SCM提供程序自动检测失败”是一个警告,实际错误如下-“文件[moduleKey=abc.Krish,relative=KrishTests/KrishTests.swift,basedir=/Users/vjayah1/Desktop/Krish]不能被索引两次。请检查包含/排除模式是否为主文件和测试文件生成不相交集”。
##########################
# Required configuration #
##########################

sonar.projectKey=abc.Krish
sonar.projectName=Krish
sonar.projectVersion=1.0


# Comment if you have a project with mixed ObjC / Swift
sonar.language=swift

# Project description
sonar.projectDescription=prjDescription

# Path to source directories
sonar.sources=/Users/vjayah1/Desktop/Krish
# Path to test directories (comment if no test)
sonar.tests=/Users/vjayah1/Desktop/Krish/KrishTests

# Destination Simulator to run tests
# As string expected in destination argument of xcodebuild command
# Example = sonar.swift.simulator=platform=iOS Simulator,name=iPhone 6,OS=9.2
sonar.swift.simulator=platform=iOS Simulator,name=iPhone 7,OS=10.1

# Xcode project configuration (.xcodeproj)
# and use the later to specify which project(s) to include in the analysis (comma separated list)
# Specify either xcodeproj or xcodeproj + xcworkspace
#sonar.swift.project=MyPrj.xcodeproj
#sonar.swift.workspace=MyWrkSpc.xcworkspace



sonar.swift.project=Krish.xcodeproj





# Scheme to build your application
sonar.swift.appScheme=Krish
# Configuration to use for your scheme. if you do not specify that the default will be Debug
sonar.swift.appConfiguration=Debug

##########################
# Optional configuration #
##########################

# Encoding of the source code
sonar.sourceEncoding=UTF-8


# SCM
# sonar.scm.enabled=true
# sonar.scm.url=scm:git:http://xxx

# JUnit report generated by run-sonar.sh is stored in sonar-reports/TEST-report.xml
# Change it only if you generate the file on your own
# The XML files have to be prefixed by TEST- otherwise they are not processed
# sonar.junit.reportsPath=sonar-reports/

# Lizard report generated by run-sonar.sh is stored in sonar-reports/lizard-report.xml
# Change it only if you generate the file on your own
# sonar.swift.lizard.report=sonar-reports/lizard-report.xml

# Cobertura report generated by run-sonar.sh is stored in sonar-reports/coverage.xml
# Change it only if you generate the file on your own
# sonar.swift.coverage.reportPattern=sonar-reports/coverage*.xml

# OCLint report generated by run-sonar.sh is stored in sonar-reports/oclint.xml
# Change it only if you generate the file on your own
# sonar.swift.swiftlint.report=sonar-reports/*swiftlint.txt

# Paths to exclude from coverage report (tests, 3rd party libraries etc.)
# sonar.swift.excludedPathsFromCoverage=pattern1,pattern2
sonar.swift.excludedPathsFromCoverage=.*Tests.*
# Path to source directories
sonar.sources=/Users/vjayah1/Desktop/Krish
# Path to test directories (comment if no test)
sonar.tests=/Users/vjayah1/Desktop/Krish/KrishTests
sonar.exclusions=/Users/vjayah1/Desktop/Krish/KrishTests/**/*