问题报告成功,但仪表板上没有问题
Successful issue report, but no issues on dashboard
我目前正在寻找将代码分析添加到 C# 项目中的方法。我正在 运行 通过 Jenkins/C#/Visual Studio 插件进行分析,但在仪表板上没有收到任何问题报告。我的问题 JSON 报告有很多以下问题:
{
"ruleId":"CS7035",
"level":"warning",
"message":"The specified version string does not conform to the recommended format - major.minor.build.revision",
"locations":[
{
"resultFile":{
"uri":"my file",
"region":{
"startLine":123,
"startColumn":22,
"endLine":123,
"endColumn":33
}
}
}
],
"properties":{
"warningLevel":4
}
},
...
很明显,分析工作正常并产生了问题。但是,当我在仪表板上查看项目时,它没有显示 bugs/vulnerabilities/etc。有趣的是,它确实显示了代码行数和重复统计信息。
分析确实适用于我们的 JS 代码,因此它似乎只是 C# 的事情。
您使用的 C# 插件版本 5.3 不支持新版本的 SARIF JSON 格式。
这已在 5.3.1 版中修复 - 请参阅 SONARCS-602。
更新到最新版本的插件应该可以解决您的问题。
我目前正在寻找将代码分析添加到 C# 项目中的方法。我正在 运行 通过 Jenkins/C#/Visual Studio 插件进行分析,但在仪表板上没有收到任何问题报告。我的问题 JSON 报告有很多以下问题:
{
"ruleId":"CS7035",
"level":"warning",
"message":"The specified version string does not conform to the recommended format - major.minor.build.revision",
"locations":[
{
"resultFile":{
"uri":"my file",
"region":{
"startLine":123,
"startColumn":22,
"endLine":123,
"endColumn":33
}
}
}
],
"properties":{
"warningLevel":4
}
},
...
很明显,分析工作正常并产生了问题。但是,当我在仪表板上查看项目时,它没有显示 bugs/vulnerabilities/etc。有趣的是,它确实显示了代码行数和重复统计信息。
分析确实适用于我们的 JS 代码,因此它似乎只是 C# 的事情。
您使用的 C# 插件版本 5.3 不支持新版本的 SARIF JSON 格式。
这已在 5.3.1 版中修复 - 请参阅 SONARCS-602。
更新到最新版本的插件应该可以解决您的问题。