[英]SonarQube / AngularJS - How to I get SonarQube up and running to get my Angular project integrated / analyzed?
我有一個前端項目(AngularJS——不是最新版本),想用 SonarQube 分析代碼。
這是我到目前為止所做的。
1) 從 GitHub 抓取我的項目並克隆到桌面。
2) 下載 SonarQube-6.5 並解壓到桌面。
3)打開sonarqube-6.5\extensions\plugins(在我解壓出來的目錄下)貼上一個前端插件(從https://github.com/groupe-sii/sonar-web-frontend-plugin下載)
4)在我的項目的 web 目錄中創建了 sonar-project.properties
內容
# Required metadata
sonar.projectKey=project-name
sonar.projectName=project name
sonar.projectVersion=0.1
# Comma-separated paths to directories with sources (required)
sonar.sources=src/app
# exclude some files and folders (typically dependencies)
sonar.exclusions=bower_components/**/*, node_modules/**/*
# Encoding of the source files
sonar.sourceEncoding=UTF-8
然后我在命令行中運行了以下命令。
cd 項目根目錄
"c:\\sonar-scanner-msbuild-3.0.2.656\SonarQube.Scanner.MSBuild.exe" 開始 /k:"orag.sonarqube:sonarqube-scanner-msbuild" /n:"CMNHMobile-nextrelease" /v:" 1.0" c:\pathto ms build\MSBuild.exe /t:Rebuild "c:\sonar-scanner-msbuild-3.0.2.656\SonarQube.Scanner.MSBuild.exe" 結束
在這些步驟之后,我沒有在我的 localhost:9000 (SonarQube) 中看到任何項目
我可以做些什么來展示項目以供分析?
這是 SonarJS 項目 github 主頁,您可以在其中獲取最新更新: https://github.com/SonarSource/SonarJS
使用以下插件(SonarJS)有助於解決我的困惑並開始分析-docs.sonarqube.org/display/PLUG/SonarJS
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.