项目作者: prahveent

项目描述 :
SonarQube Server
高级语言:
项目地址: git://github.com/prahveent/sonarqube-server.git
创建时间: 2020-04-15T17:28:52Z
项目社区:https://github.com/prahveent/sonarqube-server

开源协议:

下载


Prerequisites

  1. * Install docker
  2. * Install java

Setup SonarQube Server

  1. clone this repo and run below command
  2. ```
  3. $ docker-compose up -d
  4. ```
  5. Once you done with above command, you can access the sonar qube server on http://localhost:9000,

Defualt Credetials

  1. ```
  2. username: admin
  3. password: admin
  4. ```

How To Run Sonar Scanner

  1. * Download [sonnar scanner cli] (https://docs.sonarqube.org/latest/analysis/scan/sonarscanner/)
  2. * Create sonar-project.properties file in root of the project
  3. ```
  4. sonar-project.properties
  5. sonar.projectKey=owner-app
  6. sonar.sources=.
  7. sonar.language=ts
  8. sonar.exclusions=node_modules
  9. sonar.eslint.reportPaths=lint-report.json
  10. sonar.host.url=http://localhost:9000
  11. sonar.login=ff4d45d148eed652f85c0b8fed5ca64c1a28179f
  12. ```
  13. * Run sonnar scanner command in root of the project directory
  14. ```
  15. $ _path_to_downloaded_cli\bin\sonar-scanner
  16. ```

Run scanner for dotnet core app

  1. * Install sonarscanner dev tool
  2. ```
  3. $ dotnet tool install --global dotnet-sonarscanne
  4. ```
  5. * Run below command to scan
  6. ```
  7. $ dotnet sonarscanner begin /k:"parkly-backend" /d:sonar.host.url="http://localhost:9000" /d:sonar.login="ff4d45d148eed652f85c0b8fed5ca64c1a28179f"
  8. $ dotnet build
  9. $ dotnet sonarscanner end /d:sonar.login="ff4d45d148eed652f85c0b8fed5ca64c1a28179f"
  10. ```