I’m in a Javascript node-based environment. I want to launch the scanner in the back end.
Although I explicitly included three javascript files in the configuration GUI of SonarQube, SonarScanner in any case tries to open the node_modules/.bin/node-gyp files. I think it’s a bug because there are tons of similar files in the same directory which are correctly ignored; if I manually remove the files node-gyp, node-gyp.bat and node-gyp.ps1 from node_modules/.bin, everything works.
Reproducing the bug
For reproducing the bug, it’s enough to install node-gyp or a library that uses it, like sqlite3.
Hello, it actually works now. I didn’t update sonarqube and I didn’t change any project file neither meanwhile. I have just run the scanner again and it doesn’t raise any exception about that file.
I also changed the JDK from 11 to 1.8 but it still works.
I suppose that the problem was not on Sonar side, maybe on Windows side. What to do you think about it?
The typical way to configure your analysis, is to set sonar.sources rather than sonar.inclusions. sonar.coverage.exclusions won’t exclude files from the analysis, by the way, only from the coverage reports (i.e., unit test coverage).