-
Notifications
You must be signed in to change notification settings - Fork 256
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
Add support for .editorconfig documents #734
Conversation
dfdbcb7
to
6bbbf56
Compare
Thanks @sharwell! Lets merge this as soon as CI passes |
6bbbf56
to
60dd4a1
Compare
AnalyzerConfigFiles = | ||
{ | ||
("/.editorconfig", SourceText.From(RootEditorConfig, Encoding.UTF8)), | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering when this can be different than using AdditionalFiles like https://github.com/dotnet/roslyn-analyzers/blob/1ead3c96987ec6200209ab602529b9bab573833d/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotPrefixEnumValuesWithTypeNameTests.cs#L172 for example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering when this can be different than using AdditionalFiles
An .editorconfig which is added only as an additional file is meaningless on its own. The only reason that analyzer works is it manually parses the file, which may or may adhere to the behavior the compiler provides (I'm fairly sure it doesn't).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sharwell Ahhhh, that's why it works in roslyn-analyzers tests without a [*.cs]
section while the compiler requires it.
No description provided.