我用sonar.cxx插件在SonarCube的嵌入式C代碼上運行代碼分析。 我也解析與sonarcube與Rough Auditing Tool for Security (RATS)生成的XML和我得到這個錯誤: This function does not properly handle non-NULL terminated strings. This does not result in
我寫了一個函數來檢查,如果一個變量已經被分配到,但我想不出我應該怎麼比較節點: private static bool IsAssignment(SyntaxNode node)
{
if (node is ArgumentSyntax)
{
//This doesn't work even though both are ref tokens
我寫了一個分析器,並驗證它正在工作。 [DiagnosticAnalyzer(LanguageNames.CSharp)]
public class ConstDiagnosticAnalyzer : DiagnosticAnalyzer
{
public const string DiagnosticId = "LocalizationTool";
private st