Skip to content

Commit 7c57102

Browse files
authored
build: add sonar-project.properties to account for what are sources and test files (#2142)
* build: add sonar-project.properties to account for what are sources and test files * docs: add project badges to github * build: also ignore .stories.ts files
1 parent e629920 commit 7c57102

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.github/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
This is the working repository of the upcoming new Backoffice to Umbraco CMS.
44

5+
[![Build and test](https://github.com/umbraco/Umbraco.CMS.Backoffice/actions/workflows/build_test.yml/badge.svg)](https://github.com/umbraco/Umbraco.CMS.Backoffice/actions/workflows/build_test.yml)
56
[![Storybook](https://github.com/umbraco/Umbraco.CMS.Backoffice/actions/workflows/azure-static-web-apps-ambitious-stone-0033b3603.yml/badge.svg)](https://github.com/umbraco/Umbraco.CMS.Backoffice/actions/workflows/azure-static-web-apps-ambitious-stone-0033b3603.yml)
7+
[![SonarCloud](https://sonarcloud.io/api/project_badges/measure?project=umbraco_Umbraco.CMS.Backoffice&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=umbraco_Umbraco.CMS.Backoffice)
68

79
## Installation instructions
810

sonar-project.properties

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Define the same root directory for sources and tests
2+
sonar.sources = src/
3+
sonar.tests = src/
4+
5+
# Include test files in the test scope
6+
sonar.test.inclusions = src/**/*.test.ts
7+
8+
# Exclude test and stories files from the source scope
9+
sonar.exclusions = src/**/*.test.ts, src/**/*.stories.ts

0 commit comments

Comments
 (0)