Replies: 1 comment 3 replies
-
@jasonmalinowski (or pull in anyone you think knows MSBuildWorkspace well). Who is responsible for adding .editorconfig to the workspace? Should the MSBuildWorkspace do this? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm doing a command-line tool that runs a specific set of analyzers over a specified solution.
I create a MSBuildWorkspace with the solution file, then get the solution.
However, while it does respect the severity settings defined in the solution's .editorconfig files, some of my analyzers use some custom key/value pairs stored in .editorconfig. Specifically, one of the analyzers looks for a whitelisted string literal.
This works fine when I load my analyzers on an editor, but when I run the analysis from the command line tool, it does not respect this rule. While debugging i found the following:
AnalyzerConfigOptions
object withTryGetValue
, it gets a null value.AdditionalDocuments
(@CyrusNajmabadi told me it should be there to be accessible from an analyzer)Am I doing it wrong, or is it a problem with MSBuildWorkspace? And if I'm doing it wrong, what should I be doing?
Beta Was this translation helpful? Give feedback.
All reactions