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 Visual Studio is not yet possible however, SonarQube for Visual Studio will fetch file exclusions from the SonarQube (Server, Cloud) or SonarQube Community Build server when you bind a project. See below for more information.
Retrieving exclusions from the server
File exclusions
Defining file exclusions locally in SonarQube for Visual Studio is not yet possible, however, SonarQube for Visual Studio will fetch file exclusions from SonarQube Server or SonarQube Cloud when you bind a project or update a binding. These settings are saved to a file named sonar.settings.json.
Note that in SonarLint for Visual Studio 7.0, the settings file was moved outside of the solution directory; please check the Legacy Connected Mode article on the Previous versions page for information about the settings file in versions 6.16 and older.
For more information about how SonarQube for Visual Studio settings are handled by the server, see the SonarQube Server, SonarQube Cloud, or SonarQube Community Build documentation on setting your analysis scope.
Known limitations for file exclusions:
- Supported Languages: C# & VB (.NET support in SonarLint v6.15+), C, C++, CSS, JavaScript, TypeScript, and Secrets.
- Patterns should start with
**/
- Multicriteria and Test exclusions are not supported. SonarQube for Visual Studio only supports Global Source File Exclusions, Source File Exclusions, and Source File Inclusions when setting the analysis scope. See the pages about file inclusion and exclusion in the SonarQube Server, SonarQube Cloud, or SonarQube Community Build documentation.
Was this page helpful?