Open sir4ur0n opened 6 years ago
Hey @Sir4ur0n - thanks for reporting this. It seems like a reasonable feature request to me, and probably not terribly difficult to implement. Would you be interested in making a PR?
In the meantime I think you could probably adapt this to your needs:
stack exec -- hpc report --xml-output $(find $(stack path --local-hpc-root) -name \*.tix)
Thank you @mattaudesse for the tip, I still have struggle to make it work but I think it's more my lack of understanding of GHC code coverage. At least stack exec -- hpc report
correctly offers all the HPC options, so I'm no longer blocked.
Keeping this issue open for when somebody (could be me 😄 ) is motivated to add this feature.
Another use case for this would be to enable the --decl-list
option from https://downloads.haskell.org/ghc/latest/docs/users_guide/profiling.html#hpc-report
Also, I always get 0/0 100%
when using the stack exec -- hpc report ...
workaround from above :thinking:
I could not find a way to pass options to HPC (as documented in https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/profiling.html#hpc-report).
The one I am particularly interested in is
--xml-output
to be able to parse coverage (and hopefully convert it into SonarQube-compatible code coverage later). I could not find an equivalent instack
,stack hpc
orstack hpc report
documentation/help.