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.

https://stackoverflow.com/questions/35230453/sonar-jdbc-properties-are-not-supported-anymore-in-sonarqube-5-3-version

不用配置数据库信息,只需要配置url,数据会直接渲染在网页上。

问题2及解决:

问题:

使用sonar的时候报错svn: E175002: Connection has been shutdown: javax.net.ssl.SSLProtocolException: handshake alert:  unrecognized_name

解决:

https://support.xebialabs.com/hc/en-us/community/posts/203291975-SOLVED-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安装使用的更多相关文章

  1. Eclipse插件CheckStyle的安装和使用

    转载自:http://www.cnblogs.com/lanxuezaipiao/p/3202169.html CheckStyle是SourceForge下的一个项目,提供了一个帮助JAVA开发人员 ...

  2. Sonar安装与使用说明

    我总结的Sonar安装与使用说明,需要的可以去网盘下载. 网盘地址: http://pan.baidu.com/s/199BII

  3. MyEclipse中阿里JAVA代码规范插件(P3C)的安装及使用

    JAVA代码规范插件(P3C)是阿里巴巴2017年10月14日在杭州云栖大会上首发的,使之前的阿里巴巴JAVA开发手册正式以插件形式公开走向业界.插件的相关信息及安装包都可以在GitHub(https ...

  4. IDEA中阿里JAVA代码规范插件(P3C)的安装及使用

    JAVA代码规范插件(P3C)是阿里巴巴2017年10月14日在杭州云栖大会上首发的,使之前的阿里巴巴JAVA开发手册正式以插件形式公开走向业界.插件的相关信息及安装包都可以在GitHub(https ...

  5. 在eclipse上Checkstyle的安装和使用

    1. 概述 随着中心的代码规范的建立和实施,项目组对代码规范要求,以及软件工程师们对自身代码的编写规范重要性的认知,“代码规范”已经成为了中心的一个“热词”.然后怎么才能写出有规范的代码,怎么才能养成 ...

  6. sonar安装

    ##jdk不要用yum下载的 一.下载sonar源码 cd /usr/local/src wget https://sonarsource.bintray.com/Distribution/sonar ...

  7. Java代码质量监控工具Sonar安装

    1.  代码质量七宗罪 Sonar是一个代码质量管理系统.它的帮助文档开篇明义,提出了代码质量的七宗罪.总结的比較到位.最好还是一看: 1.        Bug和隐藏Bug(Bugs and Pot ...

  8. 高版本sonar安装遇到的坑-sonar 6.6

    最近安装了6.6版本的sonar,发现里面的坑还是很多,下面列举下遇到的坑 sonar插件地址:https://docs.sonarqube.org/display/PLUG/Plugin+Libra ...

  9. jenkins + sonar 安装配置

    最近把snoar 添加上了 [root@snoar data]#   wget https://sonarsource.bintray.com/Distribution/sonarqube/sonar ...

随机推荐

  1. [原][osgearth]osgearthElvation中的一帧

    create tile key contains 获取tile上的临界值 这里先获取层数的切份(下图) 然后使用xmin,xmax,ymin,ymax获取tile的四个点 再通过geoextent获取 ...

  2. Spring中<bean>标签之使用p标签配置bean的属性

    在spring的bean配置文件中我们常可以见到下面的例子: <bean id="user" class="com.sys.User" p:name-re ...

  3. mysql数据库的备份及免密码上传

    主要利用了mysqldump和sshpass进行备份和免密上传 以下是代码实现: #!/bin/bash #该脚本放在主服务器运行 #从服务器账号密码ipremotehost="xxxxxx ...

  4. SNMP:使用net-snmp捕捉trap

    管理端:172.18.0.135  win7系统     代理端:172.18.0.212    Debian7.2 前提:代理端已配置snmp,可正常实现用SNMP协议实现系统信息监控 1.管理端下 ...

  5. bzoj-5049-线段树

    5039: [Jsoi2014]序列维护 Time Limit: 20 Sec  Memory Limit: 256 MBSubmit: 323  Solved: 193[Submit][Status ...

  6. Python3 内建函数一览

    ###################################################### """Python3 内建函数大全""& ...

  7. 在请求的参数中设置可选值列表为当前职责可访问的所有OU

    方法一: 实现此需求的前提之一是为该请求开启多业务实体访问,开启方法 系统管理员->系统管理->并发->程序,进入OAF页面,查询你的并发,然后点更新,选择请求,在业务实体模式下选择 ...

  8. Android学习必备--java工具15个

    Weka .Weka集成了数据挖掘工作的机器学习算法.这些算法可以直接应用于一个数据集上或者你可以自己编写代码来调用.Weka包括一系列的工具,如数据预处理.分类.回归.聚类.关联规则以及可视化. M ...

  9. linux 命令-case

    case 命令作用: case语句使用于需要进行多重分支的应用情况 case 命令使用场景 在shell中的case结构与C/C++中的switch结构是相同的. 它允许通过判断来选择代码块中多条路径 ...

  10. Redis集群搭建笔记

    系统为CentOS7,创建9001-9006 6个文件夹,复制 redis-server redis.conf 文件到6个新文件夹下 redis.conf文件配置如下: port 9001 daemo ...