`
dannyhz
  • 浏览: 403925 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
文章分类
社区版块
存档分类
最新评论

如何在sonar中添加 rule

 
阅读更多
Sonar是可以添加rule的, 可以自己写代码的形式添加,可以在界面编辑已有的rule

https://docs.sonarqube.org/display/PLUG/Writing+Custom+Java+Rules+101

https://docs.sonarqube.org/display/DEV/Adding+Coding+Rules+using+XPath

https://docs.sonarqube.org/display/PLUG/Custom+Rules+for+Java

https://docs.sonarqube.org/display/DEV/Adding+Coding+Rules


https://docs.sonarqube.org/display/SONARQUBE53/Configuring+Rules



这里有具体怎么写的:

References

SonarJava documentation

SonarQube Platform: http://www.sonarqube.org/

SonarQube Java Plugin Github repository: https://github.com/SonarSource/sonar-java

SonarQube Java Custom Rules Example: https://github.com/SonarSource/sonar-custom-plugin-example
分享到:
评论

相关推荐

    sonar-java插件源码

    在深入研究SonarJava源码之前,我们先来了解一下SonarQube。SonarQube是一个开源的代码质量管理工具,它可以自动化地检测代码中的各种问题,包括bug、漏洞、代码异味(code smell)和复杂度等。SonarJava是SonarQube...

    在SonarQube上使用java自定义JavaScript检测规则

    在 pom.xml 文件中,我们需要添加 SonarQube 插件依赖项,并指定插件的打包类型为 sonar-plugin。然后,我们需要创建三个类:SonarPluginDeclare、JavaScriptPluginDeclare 和 RuleContent。SonarPluginDeclare 类...

    开发snoar的JavaScript插件流程.docx

    - **配置`pom.xml`**:在`pom.xml`中添加必要的配置来表明这是一个Sonar插件: ```xml <packaging>sonar-plugin ``` - 指定`pluginClass`,即规则主类: ```xml <pluginClass>org.sonar.myrule....

    Sonar-Custom-Plugin:自定义声纳插件的示例。 在这种情况下,插件将解析.sql文件

    而Sonar-Custom-Plugin则是针对特定需求开发的自定义插件,用于扩展SonarQube的功能,例如在本例中,该插件专门针对`.sql`文件进行解析和分析。 ### 自定义插件概述 自定义插件是SonarQube的核心特性之一,允许...

    sonarqube-spellcheck:SonarQube SpellCheck插件可提供源代码的拼写检查

    Spell Check Rule将在选定的配置文件中激活,在我们的示例中为Sonar Way配置文件 添加带有自定义单词的单词/修改字典: 您可以在SpellCheck Plugin Settings添加自定义词典: 转到Settings->General Settings->...

Global site tag (gtag.js) - Google Analytics