findbug、p3c、checkstyle、sonar安装使用
idea插件安装方式:
Preferences—>Plugins—>查找插件—>Install
Preferences—>Plugins—>Install plug from disk —>选择下载好的插件—>安装
p3c:
官方安装使用手册:
https://github.com/alibaba/p3c/blob/master/idea-plugin/README_cn.md
便捷使用:
实时检测+手动选择编码规约扫描(使用快捷键ctrl+shift+alt+j或者鼠标右键弹出菜单)
错误提示(ctrl+f1)
快速修改(alt+enter)
缺陷级别:
1.Blocker, 2.Critical, 3.Major;
FindBugs-IDEA:
离线安装包下载地址:
https://plugins.jetbrains.com/plugin/download?rel=true&updateId=29582
安装使用参考文档:
http://blog.csdn.net/qq_27093465/article/details/64923239
便捷使用:
选择文件或项目后鼠标右键选择FindBugs
缺陷级别:
1.Bad pratice编程的坏习惯
2.Malicious code vulnerability 恶意代码漏洞
3.Dodgy code 糟糕的代码
4.performance 性能
5.correctness 代码的正确性 这一项应该算是最重要的
checkstyle:
安装使用参考文档:
https://www.jianshu.com/p/25d2a197a59a
便捷使用:
文件内右键选择check current file
sonar:
安装使用可参考文档:
https://my.oschina.net/zzuqiang/blog/843406
http://blog.csdn.net/hunterno4/article/details/11687269
http://developer.51cto.com/art/201311/418198.htm
https://www.linuxidc.com/Linux/2016-08/133877p2.htm
sonar使用实例:
1.sonar安装配置和启动
解压缩sonar安装包
修改sonar配置:
cd sonar/conf
vi sonar.properties
sonar.jdbc.username=**
sonar.jdbc.password=**
sonar.jdbc.url=jdbc:mysql://**:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
sonar.sorceEncoding=UTF-8
sonar.jdbc.driverClassName=com.mysql.jdbc.Driver
运行:
/usr/local/sonarqube/bin/linux-x86-64/sonar.sh start
2.maven配置和启动sonar分析
项目配置:
maven->setting.xml修改配置(不需要添加数据库信息):
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<sonar.host.url>http://**:9000</sonar.host.url>
</properties>
</profile>
运行:
mvn clean install
mvn sonar:sonar
问题1及解决:
问题:
Property 'sonar.jdbc.url' is not supported any more. It will be ignored. There is no longer any DB connection to the SQ database.
Property 'sonar.jdbc.username' is not supported any more. It will be ignored. There is no longer any DB connection to the SQ database.
Property 'sonar.jdbc.password' is not supported any more. It will be ignored. There is no longer any DB connection to the SQ database.
不用配置数据库信息,只需要配置url,数据会直接渲染在网页上。
问题2及解决:
问题:
使用sonar的时候报错svn: E175002: Connection has been shutdown: javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name
解决:
运行时加参数:
mvn sonar:sonar -Djsse.enableSNIExtension=false
(Sometimes, when Java 1.7 communicates via HTTPS with webservers, that configured with multiple hostnames, it can throw the following error: javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name.
In this case, the solution can be either to fix the configuration of web server, or set jsse.enableSNIExtension into false by adding
to following line to the start options of the server.
-Djsse.enableSNIExtension=false)
findbug、p3c、checkstyle、sonar安装使用的更多相关文章
- Eclipse插件CheckStyle的安装和使用
转载自:http://www.cnblogs.com/lanxuezaipiao/p/3202169.html CheckStyle是SourceForge下的一个项目,提供了一个帮助JAVA开发人员 ...
- Sonar安装与使用说明
我总结的Sonar安装与使用说明,需要的可以去网盘下载. 网盘地址: http://pan.baidu.com/s/199BII
- MyEclipse中阿里JAVA代码规范插件(P3C)的安装及使用
JAVA代码规范插件(P3C)是阿里巴巴2017年10月14日在杭州云栖大会上首发的,使之前的阿里巴巴JAVA开发手册正式以插件形式公开走向业界.插件的相关信息及安装包都可以在GitHub(https ...
- IDEA中阿里JAVA代码规范插件(P3C)的安装及使用
JAVA代码规范插件(P3C)是阿里巴巴2017年10月14日在杭州云栖大会上首发的,使之前的阿里巴巴JAVA开发手册正式以插件形式公开走向业界.插件的相关信息及安装包都可以在GitHub(https ...
- 在eclipse上Checkstyle的安装和使用
1. 概述 随着中心的代码规范的建立和实施,项目组对代码规范要求,以及软件工程师们对自身代码的编写规范重要性的认知,“代码规范”已经成为了中心的一个“热词”.然后怎么才能写出有规范的代码,怎么才能养成 ...
- sonar安装
##jdk不要用yum下载的 一.下载sonar源码 cd /usr/local/src wget https://sonarsource.bintray.com/Distribution/sonar ...
- Java代码质量监控工具Sonar安装
1. 代码质量七宗罪 Sonar是一个代码质量管理系统.它的帮助文档开篇明义,提出了代码质量的七宗罪.总结的比較到位.最好还是一看: 1. Bug和隐藏Bug(Bugs and Pot ...
- 高版本sonar安装遇到的坑-sonar 6.6
最近安装了6.6版本的sonar,发现里面的坑还是很多,下面列举下遇到的坑 sonar插件地址:https://docs.sonarqube.org/display/PLUG/Plugin+Libra ...
- jenkins + sonar 安装配置
最近把snoar 添加上了 [root@snoar data]# wget https://sonarsource.bintray.com/Distribution/sonarqube/sonar ...
随机推荐
- 百度地图API 显示区域边界及地名定位
百度地图API 显示区域边界及地名定位 这个定位一共用了两个方法组成 一个是定位绘制区域边界线,另一个是地名定位 原理: 当用户输入省.市.县.区这种大地名时,我们要定位用户输入的这个位置,并显示轮廓 ...
- Andrew and Taxi CodeForces - 1100E (思维,拓扑)
大意: 给定有向图, 每条边有一个权值, 假设你有$x$个控制器, 那么可以将所有权值不超过$x$的边翻转, 求最少的控制器数, 使得翻转后图无环 先二分转为判定问题. 每次check删除能动的边, ...
- 058——VUE中vue-router之实例操作新闻列表单页面应用与路由别名的使用
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 开源FTP软件FileZilla使用介绍
简介 FileZilla是一个优秀的开源FTP软件,分为客户端版本和服务器版本,具备所有的FTP软件功能,如果想自己搭建FTP服务器,FileZilla是一个好选择. 下载 FileZilla有一个中 ...
- 在jenkins和sonar中集成jacoco(三)--使用jacoco收集集成测试的覆盖率
我们系统使用weblogic做服务器,集成测试框架使用的是junit+selenium. 首先,要把jacoco的jacocoagent.jar包放到部署应用的服务器上,接着在系统服务的JAVA_OP ...
- [置顶]
Android 打包apk无敌报错
前言: 这个问题从昨天上午一直到现在,请教了很多大佬,都没有给出确定的解决方案,可能他们也没碰到过可能,不过还是挺感谢他们的建议,一直到今天中午午休,我一直都在想这个问题,就是下面的这个,看了国内很多 ...
- Spring IOC学习
IoC基础 控制反转IoC(Inversion of Control),是一种设计思想,DI(依赖注入)是实现IoC的一种方法,也有人认为DI只是IoC的另一种说法.没有IoC的程序中我们使用面向对象 ...
- java第十次面试题
一.给定一个字符串,把字符串内的字母转换成该字母的下一个字母,a换成b,z换成a,Z换成A,如aBf转换成bCg,字符串内的其他字符不改变,给定函数,编写函数. public static void ...
- Mac下忘记mysql的root密码
cd /usr/local/mysql/bin sudo su sudo /usr/local/mysql/support-files/mysql.server stop # ./mysqld_saf ...
- 《DSP using MATLAB》第2章习题Problem2.1
1.代码: %% ------------------------------------------------------------------------ %% Output Info abo ...