which versions are you using: sonar-scanner-msbuild 5.13.0, Sonarqube 9.9 LTS
how is SonarQube deployed: Docker
what are you trying to achieve: Trying to exclude node.js versions from being scanned in our Azure DevOps pipeline using Sonarqube Azure DevOps extension.
what have you tried so far to achieve this: We set in the “Prepare for sonarqube analysis” step under Advanced sonar.exclusions=/*.js,/*.ts
In our Azure DevOps build pipeline, we have a node.js tool installer task which is set to 10.x so it currently installs 10.24.1. We also have sonarqube tasks and have sonar.exclusions=/*.js,/*.ts set in the “Prepare for sonarqube analysis” task but when the “Run Code analysis” task comes around it ends up producing an error stating
Only Node.js v14.17 or later is supported, got 10.24.1.
Its like our sonar.exclusions setting is not working. Anyway, to fix this in our Azure DevOps pipeline?
Edited sonar.exclusions to be sonar.exclusions=/*.js,/*.ts,/*.css but the build still gave me “ERROR: Only Node.js v14.17 or later is supported, got 10.24.1.”
The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.
I see from your log that analysis succeeds. So I guess you’re just trying to get a “clean” analysis?
I’ll be honest, and say I didn’t pay too much attention to the exclusions you quoted in your OP. But going back to them now - or rather, now that I’ve seen them in your analysis log:
This is happening in the CSS sensor. I guess it’s checking (or trying to) for CSS in other file types. Since you probably don’t want to exclude those other file types from analysis, the options are to ignore this error or upgrade Node.js.