Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File specific configuration should be respected over global configuration. #1066

Conversation

jamesHargreaves12
Copy link
Contributor

@jamesHargreaves12 jamesHargreaves12 commented Apr 5, 2023

With config from .globalconfig, roslynator analyzers should respect file-specific diagnostic severities over those set globally.

For example, if we have a .globalconfig file that looks like the following:

is_global = true
dotnet_diagnostic.RCS1007.severity = none

[/dev/repo/File.cs]
dotnet_diagnostic.RCS1007.severity = warning

The current behaviour is that RCS1007 will not be applied to any files.

I would expect the diagnostic to be applied to File.cs but not the rest of the files in the repository (which is consistent with how analyzers from Roslyn (and the majority of roslynator analyzers) work.

@jamesHargreaves12 jamesHargreaves12 changed the title with fix Fix overriding of global severity for a subset of files Apr 5, 2023
@jamesHargreaves12 jamesHargreaves12 changed the title Fix overriding of global severity for a subset of files File specific configuration should be respected over global configuration. Apr 5, 2023
ChangeLog.md Outdated Show resolved Hide resolved
@josefpihrt josefpihrt merged commit ffcec2a into dotnet:main Apr 14, 2023
Haarmees pushed a commit to Haarmees/Roslynator that referenced this pull request Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants