Excluding node_modules Directory from SonarQube Analysis

Dear SonarQube Support Team,

I have successfully integrated SonarQube into our CI/CD pipeline, which processes our frontend code. The pipeline builds the code and deploys the built artifacts to an AWS S3 bucket. Additionally, SonarQube generates an analysis report as part of this pipeline.

However, we have encountered an issue where SonarQube includes the node_modules directory in its analysis. Since the node_modules directory contains third-party libraries and autogenerated files, and not code written by our developers, we do not want it to be part of the analysis.

Could you please guide us on how to exclude the node_modules directory from SonarQube analysis whenever the CI/CD pipeline runs?


use **/node_modules/** either in

global setting, property sonar.global.exclusions, see

or as project setting / scanner property
sonar.exclusions , see