這邊使用 SonarQube 的社區版,這邊實作是參考這個連結,使用 MacOS 實現。
首先先提供相關資源網站:
SonerQube 官網和下載網址:
Download | SonarQube
Get the latest LTS and version of SonarQube the leading product for Code Quality and Security from the official download page.
SonerQube 的套件 sonarscanner 安裝文件:
JDK 官網下載:
JDK 安裝教學:
下載 SonarQube 社區版解壓縮後,在 command line 中找到執行的指令,像是 MacOS 是在資料夾/bin/macosx-universal-64/ 裡面。進入資料夾中輸入:
sonar.sh console
即可在瀏覽器 http://localhost:9000/ 中開啟網頁。預設帳號密碼 admin/admin 登入後更換密碼。
以下重點整理: