Skip to content

Commit

Permalink
ci: configura os arquvivos que devem ser ignorados pelo sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
deMGoncalves committed Sep 10, 2024
1 parent 0041b90 commit 7b35d0e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@
"source": "src/index.js",
"type": "module",
"types": "types.d.ts",
"version": "0.0.50"
"version": "0.0.51"
}
8 changes: 4 additions & 4 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ sonar.projectKey=bake-js_-o-id
# Definir a pasta de origem
sonar.sources=src/

# Definir a pasta de testes e incluir arquivos .spec.ts
# Definir a pasta de testes e incluir arquivos .test.ts
sonar.tests=src/
sonar.test.inclusions=src/**/*.spec.ts
sonar.test.inclusions=src/**/*.test.ts

# Excluir arquivos .spec.ts da análise principal de código
sonar.exclusions=src/**/*.spec.ts,src/**/index.js
# Excluir arquivos .test.ts da análise principal de código
sonar.exclusions=src/**/*.test.ts,src/**/index.js

# Configurar o caminho do relatório de cobertura
sonar.javascript.lcov.reportPaths=./coverage/lcov.info
10 changes: 5 additions & 5 deletions vitest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ import { defineConfig } from "vite";
export default defineConfig({
test: {
coverage: {
include: ["src/**/*.js"],
include: ["src/**/*.{js,ts}"],
exclude: [
"src/**/*.spec.ts",
"src/**/*.test.{js,ts}",
"src/**/index.js",
"src/**/types.d.ts",
"src/**/README.md",
],
reporter: ["lcov", "text"],
thresholds: {
statements: 60,
branches: 79,
statements: 57,
branches: 74,
functions: 66,
lines: 60,
lines: 57,
},
},
environment: "jsdom",
Expand Down

0 comments on commit 7b35d0e

Please sign in to comment.