#14711: Machine readable output of coverage -------------------------------------+------------------------------------- Reporter: Koterpillar | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: Code Coverage | Version: 8.2.2 Resolution: | Keywords: newcomers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by jml): There's already an `--xml-output` flag for `report`: {{{ $ hpc help report Usage: hpc report [OPTION] .. <TIX_FILE> [<MODULE> [<MODULE> ..]] Output textual report about program coverage Options: --per-module show module level detail --decl-list show unused decls --exclude=[PACKAGE:][MODULE] exclude MODULE and/or PACKAGE --include=[PACKAGE:][MODULE] include MODULE and/or PACKAGE --srcdir=DIR path to source directory of .hs files multi-use of srcdir possible --hpcdir=DIR append sub-directory that contains .mix files default .hpc [rarely used] --reset-hpcdirs empty the list of hpcdir's [rarely used] --xml-output show output in XML --verbosity=[0-2] verbosity level, 0-2 default 1 $ hpc version hpc tools, version 0.67 $ hpc report $(stack path --stack-yaml=stack-8.2.yaml --local-hpc-root )/graphql-api/graphql-api-tests/graphql-api-tests.tix --hpcdir=$(stack path --stack-yaml=stack-8.2.yaml --dist-dir)/hpc/ --xml-output <?xml version="1.0" encoding="UTF-8"?> <coverage name="/Users/jml/src/graphql-api/.stack- work/install/x86_64-osx/lts-10.4/8.2.2/hpc/graphql-api/graphql-api-tests /graphql-api-tests.tix"> <summary> <exprs boxes="3774" count="2290"/> <booleans boxes="19" true="4" false="0" count="15"/> <guards boxes="13" true="4" false="0" count="9"/> <conditionals boxes="4" true="0" false="0" count="4"/> <qualifiers boxes="2" true="0" false="0" count="2"/> <alts boxes="342" count="168"/> <local boxes="84" count="69"/> <toplevel boxes="1051" count="366"/> </summary> </coverage> }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14711#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler