-
Notifications
You must be signed in to change notification settings - Fork 103
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
How to have a multiline value #481
Comments
Thanks for using EC! Could you give us a sample use case? What key are you using, and what would a sample multiline value be? |
@cxw42 It will be usefuly for the C# compiler. (Note: I'm not a Microsoft employee, but a regular contributor to Roslyn) In short, the C# compiler currently uses .editorconfig files to parse analyzer options. Most of the time these are single-line key-value pairs, e.g, However, MSBuild properties (xml-based) can be passed to the compiler, for that, there is a build task that converts the "compiler visible" MSBuild properties to an .editorconfig during compile-time. MSBuild property values can be multiline, and here comes the problem. See issue: dotnet/roslyn#43970 |
Thanks for the additional information! I see the linked issue gives this example (I added
The linked issue talks about "global analyzer configs" --- would the multiline properties be consumed by editors or other tools? This seems to me like a very specialized use-case that is probably outside the scope of the specification. However, others may certainly have different ideas! |
would the multiline properties be consumed by editors or other tools? Yes, this will be consumed by the C#/VB compiler (ships in Visual Studio). The current behavior is that this task generates a broken .editorconfig file. |
Here is another use case, I want to enforce 120 character line lengths, but the editor config file itself fails the validation due to one of the keys and values being long, 144 chars:
|
@chrisjohnson00 that looks like noncompliant behaviour. The spec says:
I suggest opening issues against whatever program is giving you the validation error on the editorconfig file. |
See editorconfig/specification#35
The text was updated successfully, but these errors were encountered: