Skip to content

Instantly share code, notes, and snippets.

@blackymetal
Last active April 8, 2019 13:15
Show Gist options
  • Save blackymetal/b3eb9ef188fd323f1eb7b0b64ff48681 to your computer and use it in GitHub Desktop.
Save blackymetal/b3eb9ef188fd323f1eb7b0b64ff48681 to your computer and use it in GitHub Desktop.
How to install sonar
brew install sonar
brew install sonar-scanner
# File sonar-scanner.properties, on mac /usr/local/etc/sonar-scanner.properties
#Configure here general information about the environment, such as SonarQube server connection details for example
#No information about specific project should appear here
#----- Default SonarQube server
sonar.host.url=http://localhost:9000
#----- Default source code encoding
sonar.sourceEncoding=UTF-8
# File sonar-project.properties, this is used when executed sonar-scanner within project
sonar.projectKey=_newest1
sonar.projectName="Laravel"
sonar.sourceEncoding=UTF-8
sonar.sources="app/Http"
sonar.exclusion="list of folders which will exclude from scan"
sonar.php.tests.reportPath=result.junit
sonar.php.coverage.reportPaths="coverage.clover"
# Within project Laravel
phpunit --log-junit result.junit --coverage-clover coverage.clover
# Execute server
sonar console
# Execute within project
sonar-scanner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment