Skip to content

Commit

Permalink
Add Sonar duplication exclussions
Browse files Browse the repository at this point in the history
  • Loading branch information
chudilka1 committed Oct 18, 2023
1 parent 277d48f commit d7d6836
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
testTimeout: 5 * 60 * 1000,

coverageReporters: ['html', 'lcov'],
collectCoverageFrom: ['src/**/*.ts', '!src/test/*.ts', '!src/simulateScript/deno-sandbox/*.ts'],
collectCoverageFrom: ['src/**/*.ts', '!src/simulateScript/deno-sandbox/*.ts'],
coverageThreshold: {
global: {
branches: 95,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "rimraf dist && tsc -P tsconfig.build.json && cpy src/simulateScript/deno-sandbox/**/* dist/simulateScript/deno-sandbox",
"build:browser": "webpack && browserify dist/simulateScript.bundle.js -o dist/simulateScript.browser.js -p esmify --standalone simulateScript && rm dist/simulateScript.bundle.js",
"test": "jest",
"test:ci": "jest --silent --coverage --ci",
"test:ci": "jest --silent --ci --coverage --coverageReporters='text-summary' --coverageReporters='lcov'",
"test:package": "jest --config jest.config.package.js",
"lint:check": "eslint '{src,test}/**/*.ts'",
"lint:fix": "eslint '{src,test}/**/*.ts' --fix",
Expand Down
2 changes: 2 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ sonar.sources=.
sonar.exclusions=**/node_modules/**/*, **/mocks/**/*, **/testdata/**/*, **/demo/**/*, **/contracts/**/*, **/generated/**/*, **/fixtures/**/*, **/docs/**/*, **/tools/**/*, **/*.fixtures.ts, **/apiFixture.ts, **/*report.xml, **/*.config.ts, **/*.config.js, **/*.config.package.js, **/*.txt, **/*.abi, **/*.bin
# Coverage exclusions
sonar.coverage.exclusions=**/*.test.ts, **/test/**/*, **/src/simulateScript/deno-sandbox/**/*, **/index.ts
# Duplications exclusions
sonar.cpd.exclusions=**/src/v1_contract_sources/**/*

# Tests' root folder, inclusions (tests to check and count) and exclusions
sonar.tests=.
Expand Down
2 changes: 2 additions & 0 deletions test/integration/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { setupLocalTestnetFixture } from '../utils'

import { BigNumber, Contract, Wallet, utils } from 'ethers'

jest.retryTimes(2, { logErrorsBeforeRetry: true })

describe('Functions toolkit classes', () => {
let donId = simulatedDonId
let linkTokenContract: Contract
Expand Down

0 comments on commit d7d6836

Please sign in to comment.