Sonar Installation - gopisathya456/sonar GitHub Wiki
Installation of Sonar 5.6.6 Download sonarqube
cd sonarqube-5.6.6/bin/macosx-universal-64
start sonar
./sonar.sh console
Installing sonar scanner
-
Download sonar scanner sonar-scanner-3.0.3.778-macosx
-
Add the following in ~/.bash_profile
export SONAR_RUNNER_HOME="/Users/gopi/Downloads/sonar-scanner-3.0.3.778-macosx" export PATH="/Users/gopi/Downloads/sonar-scanner-3.0.3.778-macosx/bin:$PATH"
- refresh bash profile
source ~/.bash_profile
Running sonar scanner
go to your projects foldr
- Create a file sonar-project.properties with following contents
# This file is used by sonar-runner
#
# Required metadata
sonar.projectKey=myproject
sonar.projectName=custom modules only, features excluded
sonar.projectVersion=1.0
# Comma-separated paths to directories with sources (required)
sonar.sources=.
sonar.exclusions=jquery*,noteresource/**
sonar.
# Language
sonar.language=php
# To deactivate features related to unit tests execution and coverage
sonar.dynamicAnalysis=false
# Encoding of the source files
sonar.sourceEncoding=UTF-8
sonar.phpCodesniffer.argumentLine=--ignore=jquery,custom_features
sonar.php.file.suffixes=php,module,inc,install,test,profile,theme,css,js,txt,info
- In the command line run following
sonar-scanner