É uma ferramenta de analise na qualidade do código.
CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER ‘sonar’ IDENTIFIED BY ‘sonar’;
GRANT ALL ON sonar.* TO ‘sonar’@’%’ IDENTIFIED BY ‘sonar’;
GRANT ALL ON sonar.* TO ‘sonar’@’localhost’ IDENTIFIED BY ‘sonar’;
FLUSH PRIVILEGES;
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
sonar.jdbc.driverClassName=com.mysql.jdbc.Driver
sonar.jdbc.validationQuery=select 1
sonar.jdbc.username=root
sonar.jdbc.password=123456
Login: admin
Senha: admin
4.1 Criar o projeto
4.2 Criar (key) do Projeto
4.3 Dar permissão para usuario nas seções do projeto:
- Browser
- See source code
- Administer issues
- Administer
- Execute Analysis
sonar.login=admin
sonar.password=admin
sonar.projectKey=apiyandeh
sonar.projectName=ApiYandeh
sonar.projectVersion=1.0
linha de comando cmd dentro do projeto que será analisado:
C:\sonar-scanner-3.0.3.778-windows\bin\sonar-scanner.bat
%SONAR_RUNNER_HOME%
Caminho: C:\Users\priscila.ribeiro\Documents\sonarqube-6.5\bin\windows-x86-64