roslyn: .editorconfig file_header_template: can't use # (or ;) symbol
This issue has been moved from a ticket on Developer Community.
It doesn’t seem to be possible to use a #
symbol in file_header_template
, without it being parsed as a comment (escaping using \
doesn’t appear to work).
This is annoying when trying to include the text C#
.
Original Comments
Visual Studio Feedback System on 5/22/2020, 01:29 AM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Antony.Male on 5/22/2020, 01:35 AM:
This was closed as "applies to Crystal Reports".
This is very much about Visual Studio. `file_header_template` was proposed [here](https://github.com/dotnet/roslyn/issues/33012) and implemented [here](https://github.com/dotnet/roslyn/pull/41982). .editorconfig is documented [here](https://docs.microsoft.com/en-us/visualstudio/ide/create-portable-custom-editor-options?view=vs-2019).
Cyrus told me to open an issue here rather than in dotnet/roslyn.
Visual Studio Feedback System on 5/27/2020, 09:53 AM:
Thank you for sharing your feedback! Our teams prioritize action on product issues with broad customer impact. See details at: https://docs.microsoft.com/en-us/visualstudio/ide/report-a-problem?view=vs-2019#faq. In case you need answers to common questions or need assisted support, be sure to use https://visualstudio.microsoft.com/vs/support/. We’ll keep you posted on any updates to this feedback.
Original Solutions
Antony.Male solved on 5/22/2020, 01:31 AM, 0 votes:
[Removed]
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 3
- Comments: 21 (9 by maintainers)
Commits related to this issue
- EditorConfig comments cannot follow a property value Related to editorconfig/specification#23 Fixes #44596 — committed to sharwell/roslyn by sharwell 3 years ago
- Use EditorConfig (.editorconfig) to enforce consistent coding styles for everyone that works in the codebase. Note that the file_header_template setting is commented out because it is not possible to... — committed to ronaldvanmanen/SDL2Sharp by ronaldvanmanen 3 years ago
- Use EditorConfig (.editorconfig) to enforce consistent coding styles for everyone that works in the codebase. Note that the file_header_template setting is commented out because it is not possible to... — committed to ronaldvanmanen/FFmpegSharp by ronaldvanmanen 2 years ago
- Use EditorConfig (.editorconfig) to enforce consistent coding styles for everyone that works in the codebase. Note that the file_header_template setting is commented out because it is not possible to... — committed to ronaldvanmanen/SDL2Sharp by ronaldvanmanen 3 years ago
Please add semicolons to this issue as well. file_header_template text is truncated after such character.
EditorConfig specification v0.15.0 is now live, and removes comments from values: https://editorconfig-specification.readthedocs.io/#no-inline-comments. I think this should finally resolve the question! 🤞
I help out with EditorConfig and am participating in the discussion of this issue. Would this spec change meet your needs if accepted?—
(Draft — not yet part of the spec)
Thanks – happy to take a look – can you point me at the appropriate repo/project?
Now the specification is clear, any word on when this issue will be fixed in VS 2022?
It would for me. Thank you for looking into it.
@CyrusNajmabadi This is still waiting for clarification, as the specification remains ambiguous: https://github.com/editorconfig/specification/pull/29#discussion_r783382976
Thanks to the initiative of @MichaelKetting we changed the wording of the EditorConfig specification regarding inline Ini comments as follows:
This was hopefully the needed step to fix this issue in a compliant way.