码迷,mamicode.com
首页 > 编程语言 > 详细

sonar如何添加自定义JAVA规则

时间:2017-05-03 20:33:02      阅读:1933      评论:0      收藏:0      [点我收藏+]

标签:for   cto   director   put   any   home   tor   tps   rate   

参考

1、https://segmentfault.com/a/1190000008659108

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

3、https://docs.sonarqube.org/display/DEV/Adding+Coding+Rules+using+Java

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

有两种方式可以扩展代码规则:但是Java只支持方式1

1、Writing coding rules using Java via a SonarQube plugin

2、Adding XPath rules directly through the SonarQube web interface

 

Writing coding rules in Java is a six-step process:

  • Create a SonarQube plugin.
  • Put a dependency on the API of the language plugin for which you are writing coding rules.
  • Create as many custom rules as required
  • Generate the SonarQube plugin (jar file)
  • Place this jar file in the SONARQUBE_HOME/extensions/plugins directory
  • Restart SonarQube server

sonar如何添加自定义JAVA规则

标签:for   cto   director   put   any   home   tor   tps   rate   

原文地址:http://www.cnblogs.com/shengulong/p/6803452.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!