IDE集成阿里開源的代碼規約檢測插件

Eclipse

準備

  • Eclipse Juno+
  • maven3.+
  • JDK 1.7+

安裝

1、Help >> Install New Software then enter this update site URL https://p3c.alibaba.com/plugin/eclipse/update

2、Follow the wizard, restart Eclipse to take effect after install success.

使用

1、Switch language

2、Code Analyze

IDEA

準備

  • Project JDK: 1.7+
  • Gradle: 3.0+(Require JDK1.8+ for gradle)

安裝

Install from repositories

  1. Settings >> Plugins >> Browse repositories...

  2. Search plugin by keyword 'alibaba' then install 'Alibaba Java Coding Guidelines' plugin

  3. Restart to take effect.

Install from local zip file.

  1. Open https://plugins.jetbrains.com/plugin/10046-alibaba-java-coding-guidelines and download the latest version zip file. 
  2. Settings >> Plugins >> Install plugin from disk...,select the downloaded zip file in previous step then restart your idea 

 使用

  1. Switch language

  2. Inspections

  3. Code Analyze

    We use the idea standard Inspection Results to show our violations.

    We can also analyze file which is modified before vcs checkin.

其他

中文亂碼解決方法

  • Appearance&Behavior -> Appearance -> UI Options -> Name 裏面設置成微軟雅黑(microsoft yahei light)

  

  • Switch Language to English and restart.

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章