Skip to content

Commit

Permalink
sonar properties updated for ui
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuldeep-knoldus committed Jun 13, 2024
1 parent 6739936 commit f6f6a2b
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 5 deletions.
9 changes: 7 additions & 2 deletions blogs-analyzer-ui/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
"src/assets"
],
"styles": [
"src/styles.scss"
"@angular/material/prebuilt-themes/indigo-pink.css",
"src/styles.scss",
"./node_modules/bootstrap/dist/css/bootstrap.min.css"
],
"scripts": []
},
Expand Down Expand Up @@ -82,6 +84,7 @@
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"codeCoverage": true,
"polyfills": [
"zone.js",
"zone.js/testing"
Expand All @@ -93,9 +96,11 @@
"src/assets"
],
"styles": [
"@angular/material/prebuilt-themes/indigo-pink.css",
"src/styles.scss"
],
"scripts": []
"scripts": [],
"karmaConfig": "karma.conf.js"
}
}
}
Expand Down
32 changes: 32 additions & 0 deletions blogs-analyzer-ui/karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
jasmine: {},
clearContext: false
},
jasmineHtmlReporter: {
suppressAll: true
},
coverageReporter: {
dir: require('path').join(__dirname, 'coverage'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'lcovonly', file: 'lcov.info' },
{ type: 'text-summary' }
]
},
reporters: ['progress', 'coverage'],
browsers: ['Chrome'],
restartOnFileChange: true
});
};
9 changes: 7 additions & 2 deletions blogs-analyzer-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
"test": "ng test --code-coverage",
"sonar": "sonar-scanner"
},
"private": true,
"dependencies": {
Expand All @@ -19,7 +20,9 @@
"@angular/platform-browser-dynamic": "^16.0.0",
"@angular/router": "^16.0.0",
"@angular/material": "^16.1.1",
"bootstrap": "^5.3.0",
"rxjs": "~7.8.0",
"sonarqube-scanner": "^3.0.1",
"tslib": "^2.3.0",
"zone.js": "~0.13.0"
},
Expand All @@ -31,9 +34,11 @@
"jasmine-core": "~4.6.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-coverage": "~2.2.1",
"karma-coverage-istanbul-reporter": "~3.0.3",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"sonar-scanner": "^3.1.0",
"typescript": "~5.0.2"
}
}
11 changes: 10 additions & 1 deletion blogs-analyzer-ui/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
sonar.sources=src
sonar.tests=coverage
sonar.sourceEncoding=UTF-8
sonar.projectVersion=1.0
sonar.host.url=https://sonarcloud.io
sonar.organization=nashtech
sonar.projectKey=blogs-analyzer-ui
sonar.organization=nashtech
sonar.projectName=blogs-analyzer-ui
sonar.exclusions=**/node_modules/**,**/*.html,**/*.scss,**/*.spec.ts,**/*.css,**/models/**,**/assets/**
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.token=013631d793a41fe3c4b7d4fefb99224b542318c7

0 comments on commit f6f6a2b

Please sign in to comment.