Description
The C# avrogen tool generates C# comments from the "doc" properties of types and fields. If the values of those properties contain newline characters written as "\n" in the JSON avsc file, then avrogen copies those LF characters into the comments. However, when avrogen is used in Windows, all the other lines in the generated C# file end with CRLF. So the file has a mix of LF and CRLF. This causes warnings from Visual Studio, and possibly from Git if "core.safecrlf" has been set.
It would be better if avrogen normalized the newlines in the C# comments to match the rest of the generated C# file.
This change should be made only to the generated comments. The NamedSchema.Documentation and Field.Documentation properties, and the Schema.ToString() method, should not normalize the newlines within documentation. Likewise, the JSON string literals within the public static Schema _SCHEMA = Avro.Schema.Parse(…); fields should have the \r and \n characters as in the schema file.
Attachments
Issue Links
- relates to
-
AVRO-2155 Generate documentation for C# classes and enums
- Resolved