In this pull request, I have added a --sort-by-stats flag to the html-report
command. This flag provides an option for users to order the files in the index
page of the report by their coverage statistics in ascending order.
I have also ensured that this new flag works in conjunction with the existing
--tree option : when both --sort-by-stats and --tree flags are used, the
directories, as well as the files within each directory, are sorted by coverage
statistics.
This addition is intended to offer a different perspective for developers who
are working on improving coverage in existing codebases. By presenting files
with lower coverage at the top, this option could potentially assist in
prioritizing areas that may benefit from additional testing.
Note on Code Formatting
I encountered some difficulties to fmt the code due to issues finding a
compatible combination of dependencies with opam. Despite trying several OCaml
switches ranging from 4.05 to 5.1, I was unsuccessful. The ocamlformat.0.16.0
version seems to be outdated. Any assistance in resolving this issue would be
greatly appreciated!
In this pull request, I have added a
--sort-by-stats
flag to the html-report command. This flag provides an option for users to order the files in the index page of the report by their coverage statistics in ascending order.I have also ensured that this new flag works in conjunction with the existing
--tree
option : when both--sort-by-stats
and--tree
flags are used, the directories, as well as the files within each directory, are sorted by coverage statistics.This addition is intended to offer a different perspective for developers who are working on improving coverage in existing codebases. By presenting files with lower coverage at the top, this option could potentially assist in prioritizing areas that may benefit from additional testing.
Note on Code Formatting
I encountered some difficulties to
fmt
the code due to issues finding a compatible combination of dependencies with opam. Despite trying several OCaml switches ranging from 4.05 to 5.1, I was unsuccessful. Theocamlformat.0.16.0
version seems to be outdated. Any assistance in resolving this issue would be greatly appreciated!Looking forward to your feedback!