Skip to content

Commit c2a5e2f

Browse files
committed
ci: hel base sonar-project.properties Refs: KEH-189
1 parent 2ab23f6 commit c2a5e2f

1 file changed

Lines changed: 26 additions & 13 deletions

File tree

sonar-project.properties

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,35 @@
1-
sonar.projectKey=city-of-helsinki_react-helsinki-headless-cms
1+
# Base SonarQube configuration for City of Helsinki Frontend projects
2+
sonar.projectKey = city-of-helsinki_react-helsinki-headless-cms
23
sonar.organization=city-of-helsinki
4+
sonar.javascript.lcov.reportPaths=./coverage/lcov.info
5+
sonar.sourceEncoding=UTF-8
6+
7+
# react-helsinki-headless-cms specific
38
sonar.projectName=react-helsinki-headless-cms
49

5-
# Path is relative to the sonar-project.properties file. Defaults to .
610
sonar.sources=src
11+
sonar.exclusions= \
12+
**/__tests__/**/*, \
13+
**/__mocks__/**/*, \
14+
**/__snapshots__/*, \
15+
**/*.d.ts
716

8-
# Encoding of the source code. Default is default system encoding
9-
sonar.sourceEncoding=UTF-8
10-
11-
# Paths to exclude from analysis
12-
sonar.exclusions=**/node_modules/**,**/dist/**,**/lib/**,**/coverage/**,**/.storybook/**,**/scripts/**,**/*.d.ts,**/*.stories.*,**/*.mock.*
13-
14-
# Paths to test files
15-
sonar.tests=src
16-
sonar.test.inclusions=src/**/*.test.ts,src/**/*.test.tsx,src/**/__tests__/**/*.{ts,tsx}
17+
sonar.coverage.exclusions= \
18+
**/*.stories.js, \
19+
**/*.stories.ts, \
20+
**/*.stories.jsx, \
21+
**/*.stories.tsx, \
22+
**/index.js, \
23+
**/index.jsx, \
24+
**/index.ts, \
25+
**/index.tsx
1726

18-
# Coverage report
19-
sonar.javascript.lcov.reportPaths=coverage/lcov.info
27+
sonar.test.inclusions= \
28+
**/__tests__/**/*, \
29+
**/*.test.js, \
30+
**/*.test.ts, \
31+
**/*.test.jsx, \
32+
**/*.test.tsx
2033

2134
# Ignore "Refactor this code to not nest functions more than 4 levels deep." in test files,
2235
# because it's mostly raised when describe-functions are used.

0 commit comments

Comments
 (0)