You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

SonarQube排除csharpsquid:S3990规则失效,求助解决方法

Troubleshooting csharpsquid:S3990 Not Being Excluded in SonarQube Analysis

I’ve encountered similar quirks with older SonarQube and C# plugin combinations, so let’s walk through the most likely fixes for your scenario:

  • Double-check rule key and exclusion scope
    First, confirm you’re using the exact rule key as displayed in your SonarQube instance’s rule details. While csharpsquid:S3990 is correct for the "Properties should not be used as parameters" rule, typos or mismatched keys can silently break exclusions. Also, ensure you’re applying the exclusion at the right level: either uncheck the rule in your project’s quality profile, or add it to the project’s Settings > Exclusions > Rule Exclusions with the path pattern—don’t mix server-level and project-level settings accidentally.

  • Validate your file path pattern
    The **/*.* pattern should theoretically match all files, but SonarQube 6.7.1 has minor quirks with recursive path matching. Try testing with a more specific path first (e.g., MySpecificProject/**/*.* if violations are isolated to one project) to rule out path-related issues. Also, confirm the paths are relative to the project root defined in your VSTS SonarQube task.

  • Check for conflicting configurations
    It’s easy for another setting to override your rule exclusion:

    • If your quality profile marks csharpsquid:S3990 as "Mandatory", project-level exclusions won’t apply. Double-check the quality profile’s rule status.
    • Look at the "Additional Properties" field in your VSTS task—any global exclusions or conflicting rule flags here could take precedence over your project setup.
  • Test plugin version compatibility
    SonarQube 6.7.1 is an older release, and the C# plugin 7.0.1 might have known bugs with rule exclusions. Check for the latest compatible C# plugin version for SonarQube 6.7.1 (the latest supported is around 7.1.x) and upgrade it—minor plugin updates often patch these kinds of exclusion glitches.

  • Dig into verbose analysis logs
    Enable verbose logging in your VSTS SonarQube task (toggle the "Verbose" option or add /v:detailed to MSBuild arguments) and search for csharpsquid:S3990 in the logs. You’ll see messages about whether the rule was successfully excluded, or errors about invalid path patterns. This is often the fastest way to pinpoint exactly where the exclusion is failing.

内容的提问来源于stack exchange,提问作者sandeep manthri

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 04:05:12