Skip to content

Commit

Permalink
Add coverage percentage to files in the list
Browse files Browse the repository at this point in the history
To calculate the percentage, I took the code from golang's built-in
coverage tool (html generator).
  • Loading branch information
orlangure committed Feb 19, 2022
1 parent 8c13e72 commit d218c71
Show file tree
Hide file tree
Showing 14 changed files with 221 additions and 186 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@

Available files:

2 items
> covered.go
partial_with_a_very_long_name_to_trigger_ellipsis_in_the_output.go











↑/k up • ↓/j down • / filter • q quit • ? more

Available files:
2 items
> covered.go 100.00%
partial_with_a_very_long_name_to_trigger_ellipsis_in_the_output.go 75.00%
↑/k up • ↓/j down • / filter • q quit • ? more
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@

Available files:

2 items
covered.go
> partial_with_a_very_long_name_to_trigger_ellipsis_in_the_output.go











↑/k up • ↓/j down • / filter • q quit • ? more

Available files:
2 items
covered.go 100.00%
> partial_with_a_very_long_name_to_trigger_ellipsis_in_the_output.go 75.00%
↑/k up • ↓/j down • / filter • q quit • ? more
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
│ …h_a_very_long_name_to_trigger_ellipsis_in_the_output.go ├
╰──────────────────────────────────────────────────────────╯
9│ }
10│ 
11│ func SecondCovered() string {
10│ 
11│ func SecondCovered() string {
12│  switch true {
13│  default:
14│  }
15│ 
16│  return "covered"
17│ }
18│ 
19│ type useless struct{}
13│  default:
14│  }
15│ 
16│  return "covered"
17│ }
18│ 
19│ type useless struct{}

╭──────╮
────────────────────────────────────────────────────┤ 100% │
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
╭──────────────────────────────────────────────────────────╮
│ …h_a_very_long_name_to_trigger_ellipsis_in_the_output.go ├
╰──────────────────────────────────────────────────────────╯
1│ package general
2│ 
3│ func Covered() string {
1│ package general
2│ 
3│ func Covered() string {
4│  return "covered"
5│ }
6│ 
7│ func NotCovered() string {
6│ 
7│ func NotCovered() string {
8│  return "not covered"
9│ }
10│ 
11│ func SecondCovered() string {
10│ 
11│ func SecondCovered() string {
12│  switch true {
╭──────╮
────────────────────────────────────────────────────┤ 0% │
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
╭────────────╮
│ covered.go ├──────────────────────────────────────────────
╰────────────╯
1│ package general
2│ 
3│ func Full() string {
1│ package general
2│ 
3│ func Full() string {
4│  return "full" // this line should be wide to make …
5│ }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@

Available files:

2 items
> covered.go
partial_with_a_very_long_name_to_trigger_ellipsis_in_the_output.go











↑/k up • ↓/j down • / filter • q quit • ? more

Available files:
2 items
> covered.go 100.00%
partial_with_a_very_long_name_to_trigger_ellipsis_in_the_output.go 75.00%
↑/k up • ↓/j down • / filter • q quit • ? more
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@

Available files:

2 items
> covered.go
partial_with_a_very_long_name_to_trigger_ellipsis_in_the_output.go











↑/k up • ↓/j down • / filter • q quit • ? more

Available files:
2 items
> covered.go 100.00%
partial_with_a_very_long_name_to_trigger_ellipsis_in_the_output.go 75.00%
↑/k up • ↓/j down • / filter • q quit • ? more
Loading

0 comments on commit d218c71

Please sign in to comment.