Correctly hook up .editorconfig into document.GetOptionsAsync()
We never hooked up the options provider, which meant syntax trees would have the options but not the documents themselves if you asked for an OptionSet. This exposed an issue in our .editorconfig configuration fix tests: those tests were setting dotnet_style_object_initializer = false and then trying to assert that the configuration fix comes up. This setting should have had the effect that the diagnostic was being disabled and no fix would be triggered. But since .editorconfig was being ignored in calls to GetOptions() the fix triggered anyways and everything else worked from there. Once we fix the .editorconfig bug, the tests start failing because there are no longer fixes. I'm updating the tests that change the severity to simply pass true since they weren't actually sensitive to what the boolean was. The tests that are trying to test setting a value to true will need to find a different option entirely to test with, and that's tracked by https://github.com/dotnet/roslyn/issues/39466.
Showing
想要评论请 注册 或 登录