You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following is a collection of apparent issues DotProto.Rendering and DotProto.AST which are making it hard to generate *.proto files which are valid and readable.
Indentation
Messages are formatted like this:
message Aircraft { string tailNumber = 1; // The aircraft's registration number
}
whereas they should be formatted more like this:
message Aircraft {
string tailNumber = 1; // The aircraft's registration number
}
Multiline comments
Field-level comments with line breaks come out wrong. E.g. a three-line comment on the tailNumber field currently looks like this (resulting in an invalid *.proto file):
message Aircraft { string tailNumber = 1; // First line of comment
Second line of comment
Third line of comment
}
The suffix-style comments also have the problem that long lines extend outside of an 80-char buffer. Can we just use block comments everywhere? E.g.
message Aircraft {
/*
* First line of comment
* Second line of comment
* Third line of comment
*/
string tailNumber = 1;
}
Double-newlines for readability
The generated *.proto files currently insert at most one newline between subsequent headers and definitions. It would improve readability if an additional newline were inserted. For example, in:
Btw. I have created an improved pretty printer in the meantime. This could be contributed as a diff if it is of interest. It replaces the current printer.
The following is a collection of apparent issues
DotProto.Rendering
andDotProto.AST
which are making it hard to generate *.proto files which are valid and readable.Indentation
Messages are formatted like this:
whereas they should be formatted more like this:
Multiline comments
Field-level comments with line breaks come out wrong. E.g. a three-line comment on the
tailNumber
field currently looks like this (resulting in an invalid *.proto file):The suffix-style comments also have the problem that long lines extend outside of an 80-char buffer. Can we just use block comments everywhere? E.g.
Double-newlines for readability
The generated *.proto files currently insert at most one newline between subsequent headers and definitions. It would improve readability if an additional newline were inserted. For example, in:
DotProtoDefinition-level comments?
DotProtoField
allows a comment. What aboutDotProtoDefinition
(for message, enum, and service definitions)? Am I missing something?The text was updated successfully, but these errors were encountered: