Skip to content

Commit

Permalink
fix: add sonar props
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryT-CG committed Jan 11, 2024
1 parent f3c80f3 commit 27c4fcd
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 26 deletions.
6 changes: 3 additions & 3 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

module.exports = function (config) {
config.set({
basePath: '',
basePath: '.',
logLevel: config.LOG_INFO,
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
Expand Down Expand Up @@ -45,8 +45,8 @@ module.exports = function (config) {
coverageReporter: {
includeAllSources: true,
dir: 'reports',
subdir: 'coverage',
reporters: [{ type: 'html' }, { type: 'text-summary' }]
subdir: 'coverage', // common name instaed browser-specific
reporters: [{ type: 'text-summary' }, { type: 'lcov' }]
},
reporters: ['progress', 'kjhtml', 'coverage', 'sonarqubeUnit'],
preprocessors: { 'src/**/*.js': ['coverage'] },
Expand Down
28 changes: 5 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"OneCX Development Team <[email protected]>"
],
"config": {
"openapiYaml": "src/assets/api/onecx-product-store-bff.yaml",
"openapiYaml": "src/assets/api/product-store-bff-api.yaml",
"openapiOutput": "src/app/generated"
},
"scripts": {
Expand All @@ -34,19 +34,6 @@
"pre-commit": "pretty-quick --staged"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"codeCoverage": true,
"codeCoverageExclude": [
"src/app/generated/**/*"
]
}
},
"dependencies": {
"@angular-architects/module-federation": "15.0.0",
"@angular/animations": "15.2.7",
Expand All @@ -67,17 +54,12 @@
"@onecx/keycloak-auth": "^3.7.1",
"@onecx/portal-integration-angular": "^3.7.1",
"@onecx/portal-layout-styles": "^3.7.1",
"clsx": "^1.2.1",
"core-js": "^3.35.0",
"file-saver": "^2.0.5",
"i18n-iso-countries": "^7.6.0",
"keycloak-angular": "^13.0.0",
"keycloak-js": "^18.0.0",
"ngx-color": "^8.0.3",
"primeflex": "^3.3.0",
"primeflex": "^3.3.1",
"primeicons": "^6.0.1",
"primeng": "^15.3.0",
"regenerator-runtime": "0.13.11",
"primeng": "15.2.1",
"rxjs": "7.8.1",
"tslib": "^2.5.0",
"zod": "^3.22.1",
Expand Down Expand Up @@ -106,7 +88,7 @@
"@storybook/core-server": "7.0.4 ",
"@svgr/webpack": "^7.0.0",
"@swc-node/register": "^1.6.5",
"@swc/cli": "~0.1.62",
"@swc/cli": "~0.1.63",
"@swc/core": "^1.3.56",
"@swc/helpers": "0.5.1",
"@types/jasmine": "~3.10.0",
Expand Down Expand Up @@ -141,7 +123,7 @@
"ngx-translate-testing": "^6.1.0",
"postcss": "8.4.23",
"postcss-import": "~15.1.0",
"postcss-preset-env": "~8.3.2",
"postcss-preset-env": "~9.3.0",
"postcss-url": "~10.1.3",
"prettier": "^2.8.8",
"sonarqube-scanner": "^3.3.0",
Expand Down
25 changes: 25 additions & 0 deletions sonar-local-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# sonar.verbose=true
# run locally:
# docker run -p 9000:9000 sonarqube:lts
# user/pwd: admin/admin
# generate project token!
# start:
# npm run sonar
#
sonar.host.url=http://localhost:9000
sonar.login=<generated-project-token>
#
sonar.organization=onecx
sonar.projectKey=onecx-product-store-ui
sonar.projectName=onecx-product-store-ui
sonar.javascript.coveragePlugin=lcov
sonar.javascript.lcov.reportPaths=reports/coverage/lcov.info
sonar.testExecutionReportPaths=reports/sonarqube_report.xml
sonar.sourceEncoding=UTF-8
#sonar.sources=src/app
#sonar.working.directory=dist/sonar
sonar.coverage.exclusions=*.ts,*.js,src/*.ts,src/**/*.module.ts,src/environments/*,src/assets/**/*,src/app/generated/**/*,src/test/*
#sonar.exclusions=src/app/generated/**/*
#sonar.cpd.exclusions=
#sonar.tests=src/app
sonar.test.inclusions=src/app/**/*.spec.ts

0 comments on commit 27c4fcd

Please sign in to comment.