acharlop
(Avi Charlop)
October 5, 2023, 9:41am
1
Can anyone explain to me the sonar.coverage.exclusions
regex?
We currently have our latest attempt at removing coverage like this, and it still doesn’t work. All test files are still included in coverage.
sonar.coverage.exclusions=**/__test__/*,**/__mocks__/*,**/*.test.(ts|js|jsx|tsx)
Colin
(Colin)
October 5, 2023, 10:57am
2
Syntax like this won’t work. You’ll need to exclude:
**/*.test.ts,**/*.test.js,**/*.test.jsx,**/*.test.tsx*
acharlop
(Avi Charlop)
October 5, 2023, 12:18pm
3
Thanks for the explanation Colin that helped clear some things up. For nested directories would **/__test__/**
remove coverage from all files in the __test__
directory?