@@ -53,27 +53,11 @@ func TestFormatGitHubActionOutput(t *testing.T) {
5353 Span : []int32 {5 , 6 , 7 },
5454 },
5555 },
56- {
57- RuleID : "line::col" ,
58- Message : "Line and column" ,
59- Location : & descriptorpb.SourceCodeInfo_Location {
60- Span : []int32 {5 , 6 },
61- },
62- },
63- {
64- RuleID : "line" ,
65- Message : "Line only" ,
66- Location : & descriptorpb.SourceCodeInfo_Location {
67- Span : []int32 {5 },
68- },
69- },
7056 },
7157 },
7258 },
73- want : `::error file=example.proto,endColumn=8,endLine=7,col=6,line=5,title=line։։col։։endLine։։endColumn::line, column, endline, and endColumn
74- ::error file=example.proto,endLine=7,col=6,line=5,title=line։։col։։endLine::Line, column, and endline
75- ::error file=example.proto,col=6,line=5,title=line։։col::Line and column
76- ::error file=example.proto,line=5,title=line::Line only
59+ want : `::error file=example.proto,line=6,endLine=8,col=7,endColumn=8,title=line։։col։։endLine։։endColumn::line, column, endline, and endColumn
60+ ::error file=example.proto,line=6,endLine=6,col=7,endColumn=7,title=line։։col։։endLine::Line, column, and endline
7761` ,
7862 },
7963 {
@@ -90,16 +74,16 @@ func TestFormatGitHubActionOutput(t *testing.T) {
9074 },
9175 {
9276 RuleID : "core::naming_formats::field_names" ,
93- Message : "multi\n line \n comment " ,
77+ Message : "multi%0Aline%0Acomment " ,
9478 Location : & descriptorpb.SourceCodeInfo_Location {
9579 Span : []int32 {5 , 6 , 7 , 8 },
9680 },
9781 },
9882 },
9983 },
10084 },
101- want : `::error file=example.proto,endColumn=4 ,endLine=3 ,col=2,line=1 ,title=core։։naming_formats։։field_names::\n\nhttps ://linter.aip.dev/naming_formats/field_names
102- ::error file=example.proto,endColumn=8 ,endLine=7 ,col=6,line=5 ,title=core։։naming_formats։։field_names::multi\nline\ncomment\n\nhttps ://linter.aip.dev/naming_formats/field_names
85+ want : `::error file=example.proto,line=2 ,endLine=4 ,col=3,endColumn=4 ,title=core։։naming_formats։։field_names::%0A%0Ahttps ://linter.aip.dev/naming_formats/field_names
86+ ::error file=example.proto,line=6 ,endLine=8 ,col=7,endColumn=8 ,title=core։։naming_formats։։field_names::multi%0Aline%0Acomment%0A%0Ahttps ://linter.aip.dev/naming_formats/field_names
10387` ,
10488 },
10589 {
@@ -133,13 +117,13 @@ func TestFormatGitHubActionOutput(t *testing.T) {
133117 },
134118 },
135119 },
136- want : `::error file=example.proto,title=core։։naming_formats։։field_names::\n\nhttps ://linter.aip.dev/naming_formats/field_names
137- ::error file=example.proto,title=core։։naming_formats։։field_names::\n\nhttps ://linter.aip.dev/naming_formats/field_names
138- ::error file=example2.proto,title=core։։0131։։request_message։։name::\n\nhttps ://linter.aip.dev/131/request_message/name
139- ::error file=example2.proto,title=core։։0132։։response_message։։name::\n\nhttps ://linter.aip.dev/132/response_message/name
140- ::error file=example3.proto,title=core։։naming_formats։։field_names::\n\nhttps ://linter.aip.dev/naming_formats/field_names
141- ::error file=example4.proto,title=core։։naming_formats։։field_names::\n\nhttps ://linter.aip.dev/naming_formats/field_names
142- ::error file=example4.proto,title=core։։0132։։response_message։։name::\n\nhttps ://linter.aip.dev/132/response_message/name
120+ want : `::error file=example.proto,title=core։։naming_formats։։field_names::%0A%0Ahttps ://linter.aip.dev/naming_formats/field_names
121+ ::error file=example.proto,title=core։։naming_formats։։field_names::%0A%0Ahttps ://linter.aip.dev/naming_formats/field_names
122+ ::error file=example2.proto,title=core։։0131։։request_message։։name::%0A%0Ahttps ://linter.aip.dev/131/request_message/name
123+ ::error file=example2.proto,title=core։։0132։։response_message։։name::%0A%0Ahttps ://linter.aip.dev/132/response_message/name
124+ ::error file=example3.proto,title=core։։naming_formats։։field_names::%0A%0Ahttps ://linter.aip.dev/naming_formats/field_names
125+ ::error file=example4.proto,title=core։։naming_formats։։field_names::%0A%0Ahttps ://linter.aip.dev/naming_formats/field_names
126+ ::error file=example4.proto,title=core։։0132։։response_message։։name::%0A%0Ahttps ://linter.aip.dev/132/response_message/name
143127` ,
144128 },
145129 }
0 commit comments