Add --sort-by-stats
flag to html reporter
#433
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this pull request, I have added a
--sort-by-stats
flag to the html-reportcommand. 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, thedirectories, 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 acompatible 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!
Looking forward to your feedback!