Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SonarQube analysis #181

Closed
FJLopezGarcia opened this issue Nov 25, 2016 · 4 comments
Closed

Add SonarQube analysis #181

FJLopezGarcia opened this issue Nov 25, 2016 · 4 comments

Comments

@FJLopezGarcia
Copy link

What do you think about analyze your code with SonarQube? it would be great to have a "sonar-project.properties" file with the configuration to analyse your typescripts, display the code coverage...

@lathonez
Copy link
Owner

lathonez commented Nov 26, 2016 via email

@FJLopezGarcia
Copy link
Author

You just need to add a "sonar-project.properties" file in your root folder and download/setups SonarQube and Runner following the "Get Started in Two Minutes" instructions: http://docs.sonarqube.org/display/SONAR/Get+Started+in+Two+Minutes

You also need to add the TS plugin from https://github.com/Pablissimo/SonarTsPlugin in your sonar plugins folder (C:\sonarqube\sonarqube-6.1\extensions\plugins)

sonar.projectKey=Clicker
sonar.projectName=licker
sonar.projectVersion=0.0.1
sonar.projectDescription=licker app build with Ionic2 framework.

sonar.sourceEncoding=UTF-8

#------------- Sonar + DB connection ----------
sonar.host.url=http://localhost:9000
#sonar.host.url=http://10.64.4.153:443/
#sonar.jdbc.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
#sonar.jdbc.validationQuery=select 1
#sonar.jdbc.dialect=mssql
#sonar.ws.timeout=60

#sonar.javascript.jstest.reportsPath=reports/junit

sonar.modules=html_module,js_module,ts_module,json_module,css_module
#------------- HTML ----------------------------
html_module.sonar.projectName=HTML Module
html_module.sonar.language=web
html_module.sonar.sources=src/
html_module.sonar.exclusions=
html_module.sonar.projectBaseDir=.
#------------- typeScript ----------------------
ts_module.sonar.projectName=TypeScript Module
ts_module.sonar.language=ts
ts_module.sonar.sources=src/
ts_module.sonar.exclusions=
ts_module.sonar.projectBaseDir=.

ts_module.sonar.ts.tslintconfigpath=tslint.json
ts_module.sonar.ts.tslintpath=node_modules/tslint/bin/tslint

ts_module.sonar.ts.lcov.reportpath=coverage/coverage.lcov

ts_module.sonar.tests=src/
ts_module.sonar.test.inclusions=**/*spec.ts
ts_module.sonar.test.exclusions=
#------------- CSS ----------------------------
css_module.sonar.projectName=CSS Module
css_module.sonar.language=css
css_module.sonar.sources=www/build/main.css
css_module.sonar.exclusions=
css_module.sonar.projectBaseDir=.
#------------- JS ----------------------------
js_module.sonar.projectName=JavaScript Module
js_module.sonar.language=js
js_module.sonar.sources=www/build/main.js
js_module.sonar.exclusions=
js_module.sonar.projectBaseDir=.

#sonar.javascript.lcov.reportpath=coverage/coverage.lcov
#sonar.javascript.lcov.itReportPath=

@lathonez
Copy link
Owner

lathonez commented Dec 8, 2016

OK, thanks for the info. Will leave this open for reference / in case anyone wants to make a PR.

@lathonez
Copy link
Owner

Should be raised with / integrated into @angular/cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants