vscode-code-review icon indicating copy to clipboard operation
vscode-code-review copied to clipboard

[bug] Incorrect ordering for code excerpts in HTML report

Open bluenick2k17 opened this issue 3 years ago • 2 comments

🐞 Bug report

Description

When I use the alt and click feature to select multiple ranges of code, I expected that the report would display them in order of line number, not the order that they are selected. It seems like they are displaying in the order selected.

Reproduction

  1. Create a code file with multiple lines in it.
  2. Select code on a higher line number
  3. Select code on a lower line number
  4. Generate an HTML report

Example output: image

Error message


None

bluenick2k17 avatar Oct 05 '21 02:10 bluenick2k17

I agree, the selections should be ordered in the Output. by the first selected line in each range. I think it's possible to mark e.g. line 20-21 and line 18-25 (This contains the firstselection). In such cases I would expect to show:

  1. Line 18-25
  2. Line 20-21 (as the first line is greater compared to 18)

d-koppenhagen avatar Oct 05 '21 06:10 d-koppenhagen

You may want to double check and see, I thought I remember it actually combining two selections into one if they overlap (could be wrong though!). I generally agree about your ordering rules. I figure if the ordering rules in a code excerpt are the same as the rules which order the code excerpts in the report, it promotes sensible consistency.

bluenick2k17 avatar Oct 05 '21 12:10 bluenick2k17