Setting sonar scanner exclusions

trying to setup sonar scanner with some similar requirements, the basic setup is working, but when I am trying to exclude few files from sonar coverage, its not working.
I went through the links/docs in this topic chain, but not able to figure out how to exclude couple of particular specific files
I want to exclude below bold files and include rest

  • src
    • home
      • home.js
      • home.spec.js
    • user
      • user.js
      • user.spec.js
        - - index.js
        - - serviceWorker.js

In sonar properties I have:

sonar.exlusions=src/*.js  *<--to exclude the src/index.js and src/serviceWorker.js*

with above settings, sonar still shows the files to be excluded in coverage report having 0 coverage.
scratching my head :thinking:, pls help/point if you see anything I am missing or not setting correct?

1 Like

got it working, I had to replace sonar.exclusions with sonar.coverage.exclusions

this reply in the other thread helped

1 Like

Probably a late now but I notice a typo in your original post