- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在 SonarQube Scanner for MSBuild 上做 POC,作为其中的一部分,我创建了一个简单的 c# 项目,其中包含许多应标记为错误或代码异味的代码片段。我什至直接从定义的规则中举例,这些规则在我使用的 Sonar 方式质量配置文件中处于事件状态。
SonarQube 似乎没有意识到这些问题。查看我们的 SonarQube 实例,代码已成功到达那里,但没有报告任何问题。
这是一个应该作为质量配置文件“Sonar Way”中的错误捕获的代码示例(S3168 - “async”方法不应返回“void”)。包含此文件的文件称为“BadClass.cs”,可以在日志输出中看到。
class HttpPrinter
{
private string content;
public async void CallNetwork(string url) //Noncompliant
{
var client = new HttpClient();
var response = await client.GetAsync(url);
content = await response.Content.ReadAsStringAsync();
}
public async Task PrintContent(string url) // works correctly if web request finishes in under 1 second, otherwise content will be null
{
CallNetwork(url);
await Task.Delay(1000);
Console.Write(content);
}
}
SonarScanner for MSBuild 4.3.1
Using the .NET Framework version of the Scanner for MSBuild
Default properties file was found at C:\sonarscanner-msbuild\SonarQube.Analysis.xml
Loading analysis properties from C:\sonarscanner-msbuild\SonarQube.Analysis.xml
Post-processing started.
10:02:38.789 Loading the SonarQube analysis config from C:\code\vsts\TestSonarQube\src\.sonarqube\conf\SonarQubeAnalysisConfig.xml
10:02:38.792 Not running under TeamBuild
10:02:38.792 Analysis base directory: C:\code\vsts\TestSonarQube\src\.sonarqube
Build directory:
Bin directory: C:\code\vsts\TestSonarQube\src\.sonarqube\bin
Config directory: C:\code\vsts\TestSonarQube\src\.sonarqube\conf
Output directory: C:\code\vsts\TestSonarQube\src\.sonarqube\out
Config file: C:\code\vsts\TestSonarQube\src\.sonarqube\conf\SonarQubeAnalysisConfig.xml
Generating SonarQube project properties file to C:\code\vsts\TestSonarQube\src\.sonarqube\out\sonar-project.properties
Setting analysis property: sonar.visualstudio.enable=false
Using longest common projects root path as project base directory: 'C:\code\vsts\TestSonarQube\src\TestSonarQube'.
WARNING: File 'C:\code\vsts\TestSonarQube\src\packages\MSTest.TestAdapter.1.2.1\build\_common\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll' is not located under the root directory 'C:\code\vsts\TestSonarQube\src\TestSonarQube' and will not be analyzed.
File was referenced by the following projects: 'C:\code\vsts\TestSonarQube\src\TestSonarQube\TestSonarQube.csproj'.
WARNING: File 'C:\code\vsts\TestSonarQube\src\packages\MSTest.TestAdapter.1.2.1\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll' is not located under the root directory 'C:\code\vsts\TestSonarQube\src\TestSonarQube' and will not be analyzed.
File was referenced by the following projects: 'C:\code\vsts\TestSonarQube\src\TestSonarQube\TestSonarQube.csproj'.
WARNING: File 'C:\code\vsts\TestSonarQube\src\packages\MSTest.TestAdapter.1.2.1\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll' is not located under the root directory 'C:\code\vsts\TestSonarQube\src\TestSonarQube' and will not be analyzed.
File was referenced by the following projects: 'C:\code\vsts\TestSonarQube\src\TestSonarQube\TestSonarQube.csproj'.
Dumping content of sonar-project.properties
------------------------------------------------------------------------
sonar.projectKey=test.sonar.integration
sonar.working.directory=C:\\code\\vsts\\TestSonarQube\\src\\.sonarqube\\out\\.sonar
sonar.projectBaseDir=C:\\code\\vsts\\TestSonarQube\\src\\TestSonarQube
45617122-FB02-405F-B359-BA0B2E0B1847.sonar.projectKey=test.sonar.integration:45617122-FB02-405F-B359-BA0B2E0B1847
45617122-FB02-405F-B359-BA0B2E0B1847.sonar.projectName=TestSonarQube
45617122-FB02-405F-B359-BA0B2E0B1847.sonar.projectBaseDir=C:\\code\\vsts\\TestSonarQube\\src\\TestSonarQube
45617122-FB02-405F-B359-BA0B2E0B1847.sonar.sourceEncoding=utf-8
45617122-FB02-405F-B359-BA0B2E0B1847.sonar.sources=
45617122-FB02-405F-B359-BA0B2E0B1847.sonar.tests=\
"C:\\code\\vsts\\TestSonarQube\\src\\TestSonarQube\\BadClass.cs",\
"C:\\code\\vsts\\TestSonarQube\\src\\TestSonarQube\\Foo.cs",\
"C:\\code\\vsts\\TestSonarQube\\src\\TestSonarQube\\UnitTest1.cs",\
"C:\\code\\vsts\\TestSonarQube\\src\\TestSonarQube\\Properties\\AssemblyInfo.cs",\
"C:\\code\\vsts\\TestSonarQube\\src\\TestSonarQube\\packages.config"
sonar.host.url=http://MyServer:9000
sonar.verbose=true
sonar.language=cs
sonar.sourceEncoding=UTF-8
sonar.visualstudio.enable=false
sonar.modules=45617122-FB02-405F-B359-BA0B2E0B1847
------------------------------------------------------------------------
Writing processing summary to C:\code\vsts\TestSonarQube\src\.sonarqube\out\ProjectInfo.log
SONAR_SCANNER_OPTS is not configured. Setting it to the default value of -Xmx1024m
Calling the SonarQube Scanner...
Setting environment variable 'SONAR_SCANNER_OPTS'. Value: -Xmx1024m
Executing file C:\sonarscanner-msbuild\sonar-scanner-3.2.0.1227\bin\sonar-scanner.bat
Args: -Dsonar.scanAllFiles=true -Dproject.settings=C:\code\vsts\TestSonarQube\src\.sonarqube\out\sonar-project.properties --embedded <sensitive data removed>
Working directory: C:\code\vsts\TestSonarQube\src
Timeout (ms):-1
Process id: 14420
INFO: Scanner configuration file: C:\sonarscanner-msbuild\sonar-scanner-3.2.0.1227\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: C:\code\vsts\TestSonarQube\src\.sonarqube\out\sonar-project.properties
10:02:39.124 INFO: SonarQube Scanner 3.2.0.1227
10:02:39.127 INFO: Java 1.8.0_181 Oracle Corporation (64-bit)
10:02:39.128 INFO: Windows 10 10.0 amd64
10:02:39.128 INFO: SONAR_SCANNER_OPTS=-Xmx1024m
10:02:39.252 DEBUG: keyStore is :
10:02:39.252 DEBUG: keyStore type is : jks
10:02:39.252 DEBUG: keyStore provider is :
10:02:39.252 DEBUG: init keystore
10:02:39.253 DEBUG: init keymanager of type SunX509
10:02:39.601 DEBUG: Create: C:\Users\jwaide\.sonar\cache
10:02:39.602 INFO: User cache: C:\Users\jwaide\.sonar\cache
10:02:39.602 DEBUG: Create: C:\Users\jwaide\.sonar\cache\_tmp
10:02:39.605 DEBUG: Extract sonar-scanner-api-batch in temp...
10:02:39.653 DEBUG: Get bootstrap index...
10:02:39.653 DEBUG: Download: http://scsonara01:9000/batch/index
10:02:39.790 DEBUG: Get bootstrap completed
10:02:39.798 DEBUG: Create isolated classloader...
10:02:39.805 DEBUG: Start temp cleaning...
10:02:39.811 DEBUG: Temp cleaning done
10:02:39.811 DEBUG: Execution getVersion
10:02:39.814 INFO: SonarQube server 7.2.1
10:02:39.814 INFO: Default locale: "en_US", source code encoding: "UTF-8"
10:02:39.815 DEBUG: Work directory: C:\code\vsts\TestSonarQube\src\.sonarqube\out\.sonar
10:02:39.816 DEBUG: Execution execute
10:02:40.089 INFO: Publish mode
10:02:40.201 INFO: Load global settings
10:02:40.690 DEBUG: GET 200 http://scsonara01:9000/api/settings/values.protobuf | time=483ms
10:02:40.716 INFO: Load global settings (done) | time=515ms
10:02:40.721 INFO: Server id: AWU0ZxrMOjUK0oLgK7-R
10:02:40.730 INFO: User cache: C:\Users\jwaide\.sonar\cache
10:02:40.909 INFO: Load/download plugins
10:02:40.909 INFO: Load plugins index
10:02:41.312 DEBUG: GET 200 http://scsonara01:9000/api/plugins/installed | time=403ms
10:02:41.364 INFO: Load plugins index (done) | time=455ms
10:02:41.379 INFO: Load/download plugins (done) | time=470ms
10:02:41.405 DEBUG: Plugins:
10:02:41.405 DEBUG: * SonarC# 7.2.0.5463 (csharp)
10:02:41.406 DEBUG: * SonarPython 1.10.0.2131 (python)
10:02:41.406 DEBUG: * SonarJava 5.4.0.14284 (java)
10:02:41.406 DEBUG: * LDAP 2.2.0.608 (ldap)
10:02:41.406 DEBUG: * Git 1.4.1.1128 (scmgit)
10:02:41.406 DEBUG: * SonarXML 1.5.1.1452 (xml)
10:02:41.407 DEBUG: * SonarGo 1.1.0.1612 (go)
10:02:41.407 DEBUG: * SonarTS 1.7.0.2893 (typescript)
10:02:41.407 DEBUG: * SonarJS 4.1.0.6085 (javascript)
10:02:41.419 INFO: Loaded core extensions:
10:02:41.696 INFO: Process project properties
10:02:41.705 DEBUG: Process project properties (done) | time=9ms
10:02:41.725 INFO: Load project repositories
10:02:42.150 DEBUG: GET 200 http://scsonara01:9000/batch/project.protobuf?key=lighthouse.sonar.integration | time=424ms
10:02:42.213 INFO: Load project repositories (done) | time=488ms
10:02:42.288 DEBUG: Available languages:
10:02:42.288 DEBUG: * C# => "cs"
10:02:42.288 DEBUG: * Python => "py"
10:02:42.288 DEBUG: * Java => "java"
10:02:42.289 DEBUG: * XML => "xml"
10:02:42.289 DEBUG: * Go => "go"
10:02:42.289 DEBUG: * TypeScript => "ts"
10:02:42.289 DEBUG: * JavaScript => "js"
10:02:42.296 INFO: Load quality profiles
10:02:42.705 DEBUG: GET 200 http://scsonara01:9000/api/qualityprofiles/search.protobuf?projectKey=lighthouse.sonar.integration | time=407ms
10:02:42.730 INFO: Load quality profiles (done) | time=434ms
10:02:42.747 INFO: Load active rules
10:02:43.165 DEBUG: GET 200 http://scsonara01:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWU0Z0HsOjUK0oLgK8lG&p=1&ps=500 | time=416ms
10:02:43.666 DEBUG: GET 200 http://scsonara01:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWU0Z0MGOjUK0oLgK8tS&p=1&ps=500 | time=423ms
10:02:44.127 DEBUG: GET 200 http://scsonara01:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWU0Z0QPOjUK0oLgK8zu&p=1&ps=500 | time=403ms
10:02:44.550 DEBUG: GET 200 http://scsonara01:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWU0Z0Q-OjUK0oLgK80O&p=1&ps=500 | time=420ms
10:02:44.975 DEBUG: GET 200 http://scsonara01:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWU0Z0UJOjUK0oLgK85_&p=1&ps=500 | time=412ms
10:02:45.409 DEBUG: GET 200 http://scsonara01:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWU0Z0YyOjUK0oLgK8_h&p=1&ps=500 | time=414ms
10:02:45.833 DEBUG: GET 200 http://scsonara01:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWU0Z0ZxOjUK0oLgK9A3&p=1&ps=500 | time=421ms
10:02:45.860 INFO: Load active rules (done) | time=3113ms
10:02:45.863 INFO: Load metrics repository
10:02:46.265 DEBUG: GET 200 http://scsonara01:9000/api/metrics/search?f=name,description,direction,qualitative,custom&ps=500&p=1 | time=402ms
10:02:46.293 INFO: Load metrics repository (done) | time=431ms
10:02:46.324 INFO: Project key: lighthouse.sonar.integration
10:02:46.325 INFO: Project base dir: C:\code\vsts\TestSonarQube\src\TestSonarQube
10:02:46.326 DEBUG: Start recursive analysis of project modules
10:02:46.327 INFO: ------------- Scan TestSonarQube
10:02:46.451 INFO: Load server rules
10:02:46.883 DEBUG: GET 200 http://scsonara01:9000/api/rules/list.protobuf | time=432ms
10:02:46.979 INFO: Load server rules (done) | time=528ms
10:02:47.009 INFO: Base dir: C:\code\vsts\TestSonarQube\src\TestSonarQube
10:02:47.009 INFO: Working dir: C:\code\vsts\TestSonarQube\src\.sonarqube\out\.sonar\lighthouse.sonar.integration_lighthouse.sonar.integration_45617122-FB02-405F-B359-BA0B2E0B1847
10:02:47.011 INFO: Test paths: BadClass.cs, Foo.cs, UnitTest1.cs, Properties/AssemblyInfo.cs, packages.config
10:02:47.011 INFO: Source encoding: UTF-8, default locale: en_US
10:02:47.088 DEBUG: Declared extensions of language C# were converted to sonar.lang.patterns.cs : **/*.cs
10:02:47.088 DEBUG: Declared extensions of language Python were converted to sonar.lang.patterns.py : **/*.py
10:02:47.088 DEBUG: Declared extensions of language Java were converted to sonar.lang.patterns.java : **/*.java,**/*.jav
10:02:47.089 DEBUG: Declared extensions of language XML were converted to sonar.lang.patterns.xml : **/*.xml,**/*.xsd,**/*.xsl
10:02:47.089 DEBUG: Declared extensions of language Go were converted to sonar.lang.patterns.go : **/*.go
10:02:47.089 DEBUG: Declared extensions of language TypeScript were converted to sonar.lang.patterns.ts : **/*.ts,**/*.tsx
10:02:47.089 DEBUG: Declared extensions of language JavaScript were converted to sonar.lang.patterns.js : **/*.js,**/*.jsx,**/*.vue
10:02:47.089 INFO: Language is forced to cs
10:02:47.102 DEBUG: Initializers :
10:02:47.103 INFO: Index files
10:02:47.115 DEBUG: 'BadClass.cs' indexed as test with language 'cs'
10:02:47.118 DEBUG: 'Foo.cs' indexed as test with language 'cs'
10:02:47.121 DEBUG: 'UnitTest1.cs' indexed as test with language 'cs'
10:02:47.122 DEBUG: 'Properties\AssemblyInfo.cs' indexed as test with language 'cs'
10:02:47.123 INFO: 4 files indexed
10:02:47.124 INFO: Quality profile for cs: Sonar way
10:02:47.847 DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing
10:02:47.847 DEBUG: 'Generic Test Executions Report' skipped because one of the required properties is missing
10:02:47.848 DEBUG: 'Import external issues report' skipped because one of the required properties is missing
10:02:47.857 DEBUG: 'C# Tests Coverage Report Import' skipped because one of the required properties is missing
10:02:47.858 DEBUG: '[Deprecated] C# Integration Tests Coverage Report Import' skipped because one of the required properties is missing
10:02:47.859 DEBUG: 'C# Unit Test Results Import' skipped because one of the required properties is missing
10:02:47.859 DEBUG: 'Python Squid Sensor' skipped because there is no related file in current project
10:02:47.859 DEBUG: 'PylintSensor' skipped because there is no related file in current project
10:02:47.860 DEBUG: 'PylintImportSensor' skipped because there is no related file in current project
10:02:47.860 DEBUG: 'PythonXUnitSensor' skipped because there is no related file in current project
10:02:47.860 DEBUG: 'SurefireSensor' skipped because there is no related file in current project
10:02:47.861 DEBUG: 'JaCoCoSensor' skipped because there is no related file in current project
10:02:47.861 DEBUG: 'JavaSquidSensor' skipped because there is no related file in current project
10:02:47.861 DEBUG: 'XML Sensor' skipped because there is no related file in current project
10:02:47.861 DEBUG: 'SonarGo' skipped because there is no related file in current project
10:02:47.861 DEBUG: 'Go Unit Test Report' skipped because there is no related file in current project
10:02:47.862 DEBUG: 'Import of go vet issues' skipped because there is no related file in current project
10:02:47.862 DEBUG: 'Import of Golint issues' skipped because there is no related file in current project
10:02:47.862 DEBUG: 'Import of GoMetaLinter issues' skipped because there is no related file in current project
10:02:47.863 DEBUG: 'Import of TSLint issues' skipped because there is no related file in current project
10:02:47.863 DEBUG: 'Import of ESLint issues' skipped because there is no related file in current project
10:02:47.864 DEBUG: 'SonarTS' skipped because there is no related file in current project
10:02:47.864 DEBUG: 'SonarTS Coverage' skipped because there is no related file in current project
10:02:47.864 DEBUG: 'SonarJS' skipped because there is no related file in current project
10:02:47.865 DEBUG: 'SonarJS Coverage' skipped because there is no related file in current project
10:02:47.868 DEBUG: Sensors : C# Properties -> SonarJavaXmlFileSensor
10:02:47.869 INFO: Sensor C# Properties [csharp]
10:02:47.870 INFO: Sensor C# Properties [csharp] (done) | time=1ms
10:02:47.870 INFO: Sensor SonarJavaXmlFileSensor [java]
10:02:47.871 INFO: Sensor SonarJavaXmlFileSensor [java] (done) | time=1ms
10:02:47.886 DEBUG: 'BadClass.cs' generated metadata as test with charset 'UTF-8'
10:02:47.887 DEBUG: 'Foo.cs' generated metadata as test with charset 'UTF-8'
10:02:47.978 DEBUG: 'Properties/AssemblyInfo.cs' generated metadata as test with charset 'UTF-8'
10:02:47.981 DEBUG: 'UnitTest1.cs' generated metadata as test with charset 'UTF-8'
10:02:47.984 INFO: SCM provider for this project is: git
10:02:47.985 INFO: 1 files to be analyzed
10:02:48.022 DEBUG: Blame file src/TestSonarQube/BadClass.cs
10:02:48.108 DEBUG: Unable to blame file BadClass.cs. No blame info at line 4. Is file committed? [Author: PersonIdent[Not Committed Yet, , Tue Aug 28 10:02:48 2018 -0700] Source commit: null]
10:02:48.112 INFO: 0/1 files analyzed
10:02:48.116 INFO: ------------- Scan lighthouse.sonar.integration
10:02:48.151 INFO: Base dir: C:\code\vsts\TestSonarQube\src\TestSonarQube
10:02:48.151 INFO: Working dir: C:\code\vsts\TestSonarQube\src\.sonarqube\out\.sonar
10:02:48.151 INFO: Source encoding: UTF-8, default locale: en_US
10:02:48.173 DEBUG: Declared extensions of language C# were converted to sonar.lang.patterns.cs : **/*.cs
10:02:48.173 DEBUG: Declared extensions of language Python were converted to sonar.lang.patterns.py : **/*.py
10:02:48.174 DEBUG: Declared extensions of language Java were converted to sonar.lang.patterns.java : **/*.java,**/*.jav
10:02:48.174 DEBUG: Declared extensions of language XML were converted to sonar.lang.patterns.xml : **/*.xml,**/*.xsd,**/*.xsl
10:02:48.174 DEBUG: Declared extensions of language Go were converted to sonar.lang.patterns.go : **/*.go
10:02:48.175 DEBUG: Declared extensions of language TypeScript were converted to sonar.lang.patterns.ts : **/*.ts,**/*.tsx
10:02:48.175 DEBUG: Declared extensions of language JavaScript were converted to sonar.lang.patterns.js : **/*.js,**/*.jsx,**/*.vue
10:02:48.176 INFO: Language is forced to cs
10:02:48.181 DEBUG: Initializers :
10:02:48.181 INFO: Index files
10:02:48.182 INFO: 0 files indexed
10:02:48.226 DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing
10:02:48.227 DEBUG: 'Generic Test Executions Report' skipped because one of the required properties is missing
10:02:48.227 DEBUG: 'Import external issues report' skipped because one of the required properties is missing
10:02:48.227 DEBUG: 'C#' skipped because there is no related file in current project
10:02:48.227 DEBUG: 'C# Properties' skipped because there is no related file in current project
10:02:48.227 DEBUG: 'C# Tests Coverage Report Import' skipped because there is no related file in current project
10:02:48.227 DEBUG: '[Deprecated] C# Integration Tests Coverage Report Import' skipped because there is no related file in current project
10:02:48.227 DEBUG: 'C# Unit Test Results Import' skipped because there is no related file in current project
10:02:48.227 DEBUG: 'Python Squid Sensor' skipped because there is no related file in current project
10:02:48.228 DEBUG: 'PylintSensor' skipped because there is no related file in current project
10:02:48.228 DEBUG: 'PylintImportSensor' skipped because there is no related file in current project
10:02:48.228 DEBUG: 'PythonXUnitSensor' skipped because there is no related file in current project
10:02:48.228 DEBUG: 'SurefireSensor' skipped because there is no related file in current project
10:02:48.228 DEBUG: 'JaCoCoSensor' skipped because there is no related file in current project
10:02:48.228 DEBUG: 'JavaSquidSensor' skipped because there is no related file in current project
10:02:48.228 DEBUG: 'XML Sensor' skipped because there is no related file in current project
10:02:48.228 DEBUG: 'SonarGo' skipped because there is no related file in current project
10:02:48.228 DEBUG: 'Go Unit Test Report' skipped because there is no related file in current project
10:02:48.228 DEBUG: 'Import of go vet issues' skipped because there is no related file in current project
10:02:48.228 DEBUG: 'Import of Golint issues' skipped because there is no related file in current project
10:02:48.228 DEBUG: 'Import of GoMetaLinter issues' skipped because there is no related file in current project
10:02:48.229 DEBUG: 'Import of TSLint issues' skipped because there is no related file in current project
10:02:48.229 DEBUG: 'Import of ESLint issues' skipped because there is no related file in current project
10:02:48.229 DEBUG: 'SonarTS' skipped because there is no related file in current project
10:02:48.229 DEBUG: 'SonarTS Coverage' skipped because there is no related file in current project
10:02:48.229 DEBUG: 'SonarJS' skipped because there is no related file in current project
10:02:48.229 DEBUG: 'SonarJS Coverage' skipped because there is no related file in current project
10:02:48.230 DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing
10:02:48.230 DEBUG: 'Generic Test Executions Report' skipped because one of the required properties is missing
10:02:48.230 DEBUG: 'Import external issues report' skipped because one of the required properties is missing
10:02:48.231 DEBUG: 'C# Tests Coverage Report Import' skipped because one of the required properties is missing
10:02:48.231 DEBUG: '[Deprecated] C# Integration Tests Coverage Report Import' skipped because one of the required properties is missing
10:02:48.231 DEBUG: 'C# Unit Test Results Import' skipped because one of the required properties is missing
10:02:48.231 DEBUG: 'Python Squid Sensor' skipped because there is no related file in current project
10:02:48.231 DEBUG: 'PylintSensor' skipped because there is no related file in current project
10:02:48.231 DEBUG: 'PylintImportSensor' skipped because there is no related file in current project
10:02:48.232 DEBUG: 'PythonXUnitSensor' skipped because there is no related file in current project
10:02:48.232 DEBUG: 'SurefireSensor' skipped because there is no related file in current project
10:02:48.232 DEBUG: 'JaCoCoSensor' skipped because there is no related file in current project
10:02:48.232 DEBUG: 'JavaSquidSensor' skipped because there is no related file in current project
10:02:48.232 DEBUG: 'XML Sensor' skipped because there is no related file in current project
10:02:48.234 DEBUG: 'SonarGo' skipped because there is no related file in current project
10:02:48.234 DEBUG: 'Go Unit Test Report' skipped because there is no related file in current project
10:02:48.234 DEBUG: 'Import of go vet issues' skipped because there is no related file in current project
10:02:48.235 DEBUG: 'Import of Golint issues' skipped because there is no related file in current project
10:02:48.235 DEBUG: 'Import of GoMetaLinter issues' skipped because there is no related file in current project
10:02:48.235 DEBUG: 'Import of TSLint issues' skipped because there is no related file in current project
10:02:48.235 DEBUG: 'Import of ESLint issues' skipped because there is no related file in current project
10:02:48.235 DEBUG: 'SonarTS' skipped because there is no related file in current project
10:02:48.235 DEBUG: 'SonarTS Coverage' skipped because there is no related file in current project
10:02:48.236 DEBUG: 'SonarJS' skipped because there is no related file in current project
10:02:48.236 DEBUG: 'SonarJS Coverage' skipped because there is no related file in current project
10:02:48.236 DEBUG: Sensors : SonarJavaXmlFileSensor -> C# -> Zero Coverage Sensor -> CPD Block Indexer
10:02:48.236 INFO: Sensor SonarJavaXmlFileSensor [java]
10:02:48.236 INFO: Sensor SonarJavaXmlFileSensor [java] (done) | time=0ms
10:02:48.237 INFO: Sensor C# [csharp]
10:02:48.238 DEBUG: No files to analyze. Skip Sensor.
10:02:48.238 INFO: Sensor C# [csharp] (done) | time=1ms
10:02:48.238 INFO: Sensor Zero Coverage Sensor
10:02:48.238 INFO: Sensor Zero Coverage Sensor (done) | time=0ms
10:02:48.238 INFO: Sensor CPD Block Indexer
10:02:48.238 DEBUG: org.sonar.scanner.cpd.deprecated.DefaultCpdBlockIndexer is used for cs
10:02:48.238 DEBUG: No CpdMapping for language cs
10:02:48.238 INFO: Sensor CPD Block Indexer (done) | time=0ms
10:02:48.239 INFO: Calculating CPD for 0 files
10:02:48.243 INFO: CPD calculation finished
10:02:48.355 INFO: Analysis report generated in 109ms, dir size=34 KB
10:02:48.378 INFO: Analysis reports compressed in 22ms, zip size=11 KB
10:02:48.378 INFO: Analysis report generated in C:\code\vsts\TestSonarQube\src\.sonarqube\out\.sonar\scanner-report
10:02:48.378 DEBUG: Upload report
10:02:48.786 DEBUG: POST 200 http://scsonara01:9000/api/ce/submit?projectKey=lighthouse.sonar.integration | time=407ms
10:02:48.794 INFO: Analysis report uploaded in 416ms
10:02:48.799 INFO: ANALYSIS SUCCESSFUL, you can browse http://scsonara01:9000/dashboard?id=lighthouse.sonar.integration
10:02:48.800 INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
10:02:48.800 INFO: More about the report processing at http://scsonara01:9000/api/ce/task?id=AWWBfN2quxxeJ5jeK02H
10:02:48.810 DEBUG: Report metadata written to C:\code\vsts\TestSonarQube\src\.sonarqube\out\.sonar\report-task.txt
10:02:48.812 DEBUG: Post-jobs :
10:02:48.817 INFO: Task total time: 7.398 s
10:02:48.909 INFO: ------------------------------------------------------------------------
10:02:48.909 INFO: EXECUTION SUCCESS
10:02:48.909 INFO: ------------------------------------------------------------------------
10:02:48.909 INFO: Total time: 9.845s
10:02:48.961 INFO: Final Memory: 12M/306M
10:02:48.962 INFO: ------------------------------------------------------------------------
Process returned exit code 0
The SonarQube Scanner has finished
10:02:49.024 Creating a summary markdown file...
10:02:49.028 Analysis results: http://scsonara01:9000/dashboard/index/lighthouse.sonar.integration
10:02:49.029 Post-processing succeeded.
最佳答案
尝试使用项目名称或路径中没有“Test”的项目。
每个规则的规范确定它是针对产品代码、测试代码还是针对两者运行。 MSBuild 扫描器通过查看许多因素来决定项目是否为测试项目,例如项目类型和项目名称。
我猜扫描仪将您的项目归类为测试项目
所以你选择的规则不会违背它。
如果您在 .sonarqube 目录下查看,您会发现所分析的每个 MSBuild 项目都有一个 projectinfo.xml 文件。如果您查看该文件,您将看到 Scanner 是否将该项目归类为测试项目。
关于用于 MSBuild 的 SonarQube 未报告质量问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52063646/
我在为 MacOSX 构建的独立包中添加 DMG 背景的自定义图标时遇到问题。我在项目的根目录中添加了一个包。正在从中加载自定义图标,但没有加载 DMG 背景图标。我正在使用 Java fx 2.2.
Qt for Symbian 和 Qt for MeeGo 有什么区别?我知道 Qt 是一个交叉编译平台。这是否意味着如果我使用来自 Qt 的库,完全相同的库可以在所有支持 Qt 的设备(例如 Sym
我正在尝试使用 C# .NET 3.5/4.0 务实地运行 SQL Server 数据库的备份。我已经找到了如何完成此操作,但是我似乎找不到用于备份的命名空间库。 我正在寻找 Microsoft.Sq
我最近在疯狂学习 Java,但我通常是一名 .NET 开发人员。 (所以请原谅我的新手问题。) 在 .Net 中,我可以在不使用 IIS 的情况下开发 ASP.Net 页面,因为它有一个简化的 Web
这post仅当打印命令中有字符串时才有用。现在我有大量的源代码,其中包含一条声明,例如 print milk,butter 应该格式化为 print(milk,butter) 用\n 捕获行尾并不成功
所以我的问题是: https://gist.github.com/panSarin/4a221a0923927115584a 当我保存这个表格时,我收到了标题中的错误 NoMethodError (u
如何让 Html5 音频在点击时播放声音? (ogg 用于 Firefox 等浏览器,mp3 用于 chrome 等浏览器) 到目前为止,我可以通过 onclick 更改为单个文件类型,但我无法像在普
如果it1和it2有什么区别? std::set s; auto it1 = std::inserter(s, s.begin()); auto it2 = std::inserter(s, s.en
4.0.0 com.amkit myapp SpringMVCFirst
我目前使用 Eclipse 作为其他语言的 IDE,而且我习惯于不必离开 IDE 做任何事情 - 但是我真的很难为纯 ECMAScript-262 找到相同或类似的设置。 澄清一下,我不是在寻找 DO
我想将带有字符串数组的C# 结构发送到C++ 函数,该函数接受void * 作为c# 结构和char** 作为c# 结构字符串数组成员。 我能够将结构发送到 c++ 函数,但问题是,无法从 c++ 函
我正在使用动态创建的链接: 我想为f:param附加自定义转换器,以从#{name}等中删除空格。 但是f:param中没有转换器
是否可以利用Redis为.NET创建后写或直写式缓存?理想情况下,透明的高速缓存是由单个进程写入的,并且支持从数据库加载丢失的数据,并每隔一段时间持久保存脏块? 我已经搜查了好几个小时,也许是goog
我正在通过bash执行命令的ssh脚本。 FILENAMES=( "export_production_20200604.tgz" "export_production_log_2020060
我需要一个正则表达式来出现 0 到 7 个字母或 0 到 7 个数字。 例如:匹配:1234、asdbs 不匹配:123456789、absbsafsfsf、asf12 我尝试了([a-zA-Z]{0
我有一个用于会计期间的表格,该表格具有期间结束和开始的开始日期和结束日期。我使用此表来确定何时发生服务交易以及何时在查询中收集收入,例如... SELECT p.PeriodID, p.FiscalY
我很难为只接受字符或数字的 Laravel 构建正则表达式验证。它是这样的: 你好<-好的 123 <- 好的 你好123 <-不行 我现在的正则表达式是这样的:[A-Za-z]|[0-9]。 reg
您实际上会在 Repeater 上使用 OnItemDataBound 做什么? 最佳答案 “此事件为您提供在客户端显示数据项之前访问数据项的最后机会。引发此事件后,数据项将被清空,不再可用。” ~
我有一个 fragment 工作正常的项目,我正在使用 jeremyfeinstein 的 actionbarsherlock 和滑动菜单, 一切正常,但是当我想自定义左侧抽屉列表单元格时,出现异常
最近几天,我似乎平均分配时间在构建我的第一个应用程序和在这里发布问题!! 这是我的第一个应用程序,也是我们的设计师完成的第一个应用程序。我试图满足他所做的事情的外观和感觉,但我认为他没有做适当的事情。
我是一名优秀的程序员,十分优秀!