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