Skip to content

Commit

Permalink
docs: updated docs for #578 recommendation (#1148)
Browse files Browse the repository at this point in the history
  • Loading branch information
sur.la.route committed Nov 6, 2021
1 parent e3e637c commit bf3e96a
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions doc/cmd.rst
Expand Up @@ -488,6 +488,44 @@ compatible with `Cobertura`_.

You can specify the name of the output file with the ``-o`` switch.

To include complete file paths in the output file, rather than just
the file name, use [include] vs [source] in your ".coveragerc" file.

For example, use this:

.. code:: ini
[run]
include =
foo/*
bar/*
which will result in

.. code:: xml
<class branch-rate="0" complexity="0" filename="bar/hello.py" line-rate="1" name="hello.py">
<class branch-rate="0" complexity="0" filename="bar/baz/hello.py" line-rate="1" name="hello.py">
<class branch-rate="0" complexity="0" filename="foo/hello.py" line-rate="1" name="hello.py">
in place of this:

.. code:: ini
[run]
source =
foo
bar
which may result in

.. code:: xml
<class branch-rate="0" complexity="0" filename="hello.py" line-rate="1" name="hello.py">
<class branch-rate="0" complexity="0" filename="baz/hello.py" line-rate="1" name="hello.py">
Other common reporting options are described above in :ref:`cmd_reporting`.


Expand Down

0 comments on commit bf3e96a

Please sign in to comment.