feat: Added ConfigFile to simplify AnalyzerConfigFile creation.#981
feat: Added ConfigFile to simplify AnalyzerConfigFile creation.#981HavenDV wants to merge 7 commits intodotnet:mainfrom
Conversation
|
I'm a bit hesitant to add this here in the current form. Note that you can achieve the same outcome by defining the Here are issues I'd like to see addressed in a general API:
|
|
Thank you. Tried to take into account your comments. var actual = new EditorConfigFile
{
["root"] = "true",
["*", "key"] = "{|Literal:value|}",
}.ToString(); |
I did notice this. I believe you could resolve this by making var actual = new EditorConfigFile(root: true)
{
["*"] =
{
"key = {|Literal:value|}",
},
}.ToString();or: var actual = new EditorConfigFile(root: true)
{
["*"] =
{
{ "key", "{|Literal:value|}" },
},
}.ToString(); |
|
Perhaps I do not understand something, but how to specify global values other than root, which can be anything? Will the values for the |
I recently got acquainted with your package and for me creating a configuration file was problematic until I found an example. I think this can simplify the entry threshold because it adds a specific Add method that will be used intuitively.