All Javascript files in directory are being ignored

  • SQ:, SonarScanner:
  • I am trying to create a project and run a scan on my js and scss files.
  • I tried running sonar scanner with the following properties files but it is ignoring all of the js files in the source directory. I also tried disabling the scm exclusions because I saw other people suggesting that but I am still having issues. We tried renaming the source directory to something other than node_modules and that seemed to work, however we need to directory to be named node_modules for other reasons. Is there a workaround for this?


hello @rmitchellbf,

it seems that you configured your sonar.sources for node_modules directory. This is a bit unusual, usually we don’t scan the code in the dependencies. Why do you want to scan node_modules directory?

By default we exclude all the files in node_modules, you can set sonar.javascript.exclusions="" to empty to change it, but it’s not something I would advise for.

We inherited a project that acts as a private npm package that contains our custom component library and the component library lives inside its own node_modules directory within src