IDEA插件之代码质量检查利器 - Alibaba Java Coding Guidelines、CheckStyle、PMD、FindBugs、SonarLint
1. 装jdk
自动配置环境变量
2. idea配置git
git config --global user.name "xxx"
git config --global user.email "xxx@xx.com"
3. idea配置maven
解压apache-maven-xxx.jar,配置环境变量MAVEN_HOME,PATH增加%MAVEN_HOME%\bin
settings.xml
maven-repository
注意3个位置的路径尽量一致,①IDEA: File->Settings->local repository; ②IDEA:File->project structure->project->project compile output file; ③settings.xml中localRepository
遇到问题:
- IDEA异常:Unable to save settings Failed to save settings
- java.net.UnknowHostException:www.jetbrains.com & plugins.jetbrains.com
0.0.0.0 account.jetbrains.com
0.0.0.0 www.jetbrains.com
0.0.0.0 plugins.jetbrains.com
0.0.0.0 resources.jetbrains.com
- lombok 配置完 @Data还是标红
- git error: unable to unlink old (Permission denied)
- IDEA cannot open for writing(文件夹或者文件权限问题)
修改文件夹权限;
4. IDEA配置lombok
settings->plugins->lombok——install from disk
重启
5. IDEA配置注释
template text
**
* @Author: Sxx
* @Date: $date$ $time$
* @Description: TODO
$params$
$return$
*/
method
groovyScript(“def result=‘’; def params=”${_1}“.replaceAll(‘[\\[|\\]|\\s]’, ‘’).split(‘,’).toList(); for(i = 0; i < params.size(); i++) {if(i==0){result+=’ * @param ’ + params[i] + ((i < params.size() - 1) ? ‘\n’ : ‘’)}else{result+=’ * @param ’ + params[i] + ((i < params.size() - 1) ? ‘\n’ : ‘’)}}; return result”, methodParameters())
return
groovyScript(“return “KaTeX parse error: Expected group as argument to '\"' at position 7: {_1}\" ̲== 'void' ? ' *…{_1}””, methodReturnType())
6. IDEA配置热部署
7. IDEA配置mybatisx插件
下载插件搜索mybatisx后离线安装:https://plugins.jetbrains.com/