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
But my idea is to reformat the file after these changes.
I expected only an empty string between string a = 1; string b = 2;, but I actually got an empty string with two whitespaces.
@Test
public void should_format_file_without_empty_line_with_whitespaces() {
// given
var loader = new SchemaLoader(FileSystems.getDefault());
var linker = new Linker(loader, new ErrorCollector(), true, true);
var testFileLocation = Location.get("<TEST_PROTO_FILE>");
loader.initRoots(List.of(testFileLocation), List.of(testFileLocation));
var file = loader.load("test/file.proto");
var schema = linker.link(List.of(file));
// when
var protoFile = schema.protoFile("test/file.proto");
// then
assertThat(protoFile.toSchema())
.isEqualTo("""
// Proto schema formatted by Wire, do not edit.
// Source: test/file.proto
syntax = "proto3";
package test.dependency;
message TestMessage {
message NestedMessage {
string a = 1;
string b = 2;
}
}
""");
}
The text was updated successfully, but these errors were encountered:
I'm not sure if this can be considered a bug.
But my idea is to reformat the file after these changes.
I expected only an empty string between
string a = 1; string b = 2;
, but I actually got an empty string with two whitespaces.The text was updated successfully, but these errors were encountered: