我有一个前端项目(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 project root dir
"c:\\sonar-scanner-msbuild-3.0.2.656\SonarQube.Scanner.MSBuild.exe" begin /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" end
完成这些步骤后,我在 localhost:9000 (SonarQube) 中看不到任何项目
我可以做些什么来展示项目以供分析?
最佳答案
这是 SonarJS 项目的 github 主页,您可以在其中获取最新更新:https://github.com/SonarSource/SonarJS
关于angular - SonarQube/AngularJS - 如何启动并运行 SonarQube 以集成/分析我的 Angular 项目?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45761892/