File exclusions
All versions of SonarQube for IDE will fetch file exclusions from SonarQube (Server, Cloud) or SonarQube Community Build when you bind a project or update a binding while running in connected mode. Check the SonarQube Sever, SonarQube Cloud, and SonarQube Community Build documentation for information about defining your Analysis scope.
File exclusions in the IDE
Defining file exclusions locally in SonarQube for Eclipse is possible. The exclusions can be defined globally for all projects in the workspace, or per project. The simplest way to exclude a file or folder in a project is to right-click on the files or folders you want to exclude in the resource explorer, and select SonarQube > Exclude.
You can also go to the SonarQube for IDE global settings in Eclipse preferences, and add global exclusions. SonarQube for Eclipse will accept Java glob patterns. Navigate to Window > Preferences > SonarQube (or Eclipse > Settings… > SonarQube for Mac OS) to access the File exclusions page in the Preferences panel.
File exclusions defined in Eclipse also apply when running in connected mode. When a project is bound to a SonarQube (Server, Cloud) or SonarQube Community Build project, exclusions defined in the server's General Settings are merged with locally defined exclusions.
Accepted patterns
To define local exclusions in SonarQube for Eclipse, you must use the Java glob pattern syntax as defined in the Oracle documentation.
Using Eclipse plugins to index your project
SonarQube for Eclipse uses some Eclipse plugins to index your project to exclude certain files and folders in your compilation or build output directories. This improves overall performance and lowers the memory footprint.
To opt out of these exclusions, right-click on your project, select Properties > SonarQube, and clear the Rely on Eclipse plugins checkbox.
Each project should be assessed individually. Changing your selection requires a restart of the IDE
Was this page helpful?