Skip to content

Commit f7cfafc

Browse files
committed
添加sonar配置文件
1 parent f6b683c commit f7cfafc

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

karma.conf.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,13 @@ module.exports = function(config) {
5252
// test results reporter to use
5353
// possible values: 'dots', 'progress'
5454
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
55-
reporters: ['progress','coverage'],
55+
reporters: ['progress','coverage','teamcity'],
5656

5757
coverageReporter: {
58-
type:'html',
59-
dir: 'testCoverage/'
58+
dir: 'testcoverage/',
59+
reporters: [
60+
{ type: 'lcov',subdir: '.'}
61+
]
6062
},
6163

6264

@@ -84,7 +86,7 @@ module.exports = function(config) {
8486

8587
// Continuous Integration mode
8688
// if true, Karma captures browsers, runs the tests and exits
87-
singleRun: false,
89+
singleRun: true,
8890

8991
// Concurrency level
9092
// how many browser should be started simultaneous

sonar-project.properties

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Required metadata
2+
sonar.projectKey=com.supermap:iClient9
3+
sonar.projectName=iClient9
4+
sonar.projectVersion=9.0.0
5+
6+
# Comma-separated paths to directories with sources (required)
7+
sonar.sources=src/
8+
sonar.inclusions=src/**/*.js
9+
sonar.test.inclusions=test/**/*.js
10+
11+
# Language
12+
sonar.language=js
13+
14+
# Encoding of sources files
15+
sonar.sourceEncoding=UTF-8
16+
sonar.host.url=http://sonar.ispeco.com:9001
17+
18+
sonar.profile=Sonar way
19+
sonar.javascript.lcov.reportPath=testcoverage/lcov.info

0 commit comments

Comments
 (0)