streamly
streamly copied to clipboard
Create a tool to automatically find operations without test coverage
From #159.
Here is an algo to derive exposed APIs with no coverage:
Run bin/test.sh --coverage
Run cabal haddock --haddock-hoogle
Use streamly to read the hoogle data file e.g. dist-newstyle/build/x86_64-linux/ghc-8.10.4/streamly-0.8.1/doc/html/streamly/streamly.txt
Filter out the comment lines
Match the module line
Load the hpc .mix file for the module (https://hackage.haskell.org/package/hpc-0.6.0.3/docs/Trace-Hpc-Mix.html)
match the function signature lines in the module from the hoogle data file
For each function report the name if it is not found as TopLevelBox in the .mix file
We can write a fold or parser to process a single module from the hoogle data stream and then use foldMany or parseMany to process the whole file.