Skip to content

Commit 6dc7f4f

Browse files
committed
Add check for annotations that span multiple lines
1 parent 196a237 commit 6dc7f4f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

server.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,14 @@ def initiate_check_run
174174
path: file_path,
175175
start_line: start_line,
176176
end_line: end_line,
177-
start_column: start_column,
178-
end_column: end_column,
179177
annotation_level: annotation_level,
180178
message: message
181179
}
180+
# Annotations only support start and end columns on the same line
181+
if start_line == end_line
182+
annotation.merge({start_column: start_column, end_column: end_column})
183+
end
184+
182185
annotations.push(annotation)
183186
end
184187
end

0 commit comments

Comments
 (0)