SonarQube with pre commit hook ⚓

#!/bin/bashchmod +x .git/hooks/pre-commitexport PATH="$PATH:YOUR_PATH_TO_SONAR_SCANNER_BIN"sonar-scanner -Dsonar.projectKey=YOUR_PROJECT_NAME -Dsonar.sources=. -Dsonar.host.url=http://localhost:9000 -Dsonar.qualitygate.wait=true
export PATH="$PATH:/home/mypc/Downloads/sonar-scanner-cli-4.2.0.1873-linux/sonar-scanner-4.2.0.1873-linux/bin"

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store