JS/TS node_modules test files not excluded and still scanned

Template for a good new topic, formatted with Markdown:

  • ALM used : Bitbucket

  • CI system used : Bitbucket Cloud

  • Languages of the repository : JS/TS

  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)

  • Steps to reproduce : -

  • Potential workaround : None

# Scanner version
INFO: SonarScanner 5.0.1.3006

# Project configuration

INFO: Project configuration:
INFO:   Included sources: **/*.js, **/*.jsx, **/*.ts, **/*.tsx
INFO:   Excluded sources: **/node_modules/**, **/*.test.js, **/*.spec.js, **/*.test.jsx, **/*.spec.jsx, __test__/pages/*.test.js, utils/*.test.js, **/*.test.ts, **/*.spec.ts, **/*.test.tsx, **/*.spec.tsx
INFO:   Included tests: **/*.test.js, **/*.spec.js, **/*.test.jsx, **/*.spec.jsx, __test__/pages/*.test.js, utils/*.test.js, **/*.test.ts, **/*.spec.ts, **/*.test.tsx, **/*.spec.tsx
INFO:   Excluded sources for coverage: **/*mocks.js, **/static/**, **/middlewares/**, next.config.js, babel.config.js, components/icons/**, pages/index.js, utils/constants/*
INFO: 1861 files indexed (done) | time=166ms

tests inside node_modules still getting scanned

Behavior above only observed per today when this ticket raised. Yesterday there is no problem even though there is no **/node_modules/** added into sonar.exclusions

Nevermind, achieved my goals by removing node_modules directory before scanning