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 SonarCloud integration to analyze code #7

Open
vymarkov opened this issue Dec 11, 2021 · 0 comments · May be fixed by #8
Open

Add SonarCloud integration to analyze code #7

vymarkov opened this issue Dec 11, 2021 · 0 comments · May be fixed by #8

Comments

@vymarkov
Copy link
Member

vymarkov commented Dec 11, 2021

How to setup?

  1. Install jest coverage reporters:
npm i -D jest-junit jest-sonar-reporter
  1. Add jest-sonar config to package.json:
"jest-junit": {
  "outputDirectory": "test-reports",
  "outputName": "junit.xml"
},
"jestSonar": {
  "reportPath": "test-reports",
  "reportFile": "test-reporter.xml",
  "indent": 4
},
  1. Update .gitignore
echo '.scannerwork' >> .gitignore
echo 'test-reports/**' >> .gitignore
  1. Run sonar-scanner locally:
sonar-scanner -Dproject.settings=sonar-project.app.properties -Dsonar.projectKey=lazyorange_ng-workspaces

Links:

@vymarkov vymarkov linked a pull request Dec 16, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant