intelij IDEA设置goole code style风格


1.安装google-java-format 插件 
    file ->Setings... ->pligins
    输入上诉插件安装
2.下载IntelliJ Java Google Style file文件
    文件已经挂在本人博客,https://download.csdn.net/download/banana1006034246/10785007
    或者官网https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml
    复制粘贴命名为intellij-java-google-style.xml,在IDEA中设置
    file-> editor->code style 点击右窗体里scheme后面的设置图标,选择import scheme找到你的xml文件,之后按提示确定就行

问题:
遇到错误 intellij idea code style xml import failed with error message null 
原因:xml里面含有空行,这种情况常常出现在使用 linux 的wget命令下载官方xml文件导致

参考文献

google java code style 中文版
https://github.com/google/google-java-format

原文地址:https://blog.csdn.net/banana1006034246/article/details/84071935


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM