summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2019-08-31 07:50:04 -0400
committerNed Batchelder <ned@nedbatchelder.com>2019-08-31 07:50:04 -0400
commit6e5418d9d7d03e0149ea5050f27ba28cdefc1104 (patch)
tree1d5f85f28b08415c1101fc2b176bd10e648b6b1a /doc
parent9a78a80aaf8f8161b857ebf3cf02dd511181dd07 (diff)
downloadpython-coveragepy-git-6e5418d9d7d03e0149ea5050f27ba28cdefc1104.tar.gz
Tweaks to JSON report docs
Diffstat (limited to 'doc')
-rw-r--r--doc/branch.rst4
-rw-r--r--doc/cmd.rst6
-rw-r--r--doc/config.rst20
3 files changed, 16 insertions, 14 deletions
diff --git a/doc/branch.rst b/doc/branch.rst
index 9af8f050..312b3a3a 100644
--- a/doc/branch.rst
+++ b/doc/branch.rst
@@ -56,8 +56,8 @@ that were missing some branches are shown in yellow, with an annotation at the
far right showing branch destination line numbers that were not exercised.
The XML and JSON reports produced by ``coverage xml`` and ``coverage json``
-respectively also include branch information, including separate statement and
-branch coverage percentages.
+also include branch information, including separate statement and branch
+coverage percentages.
How it works
diff --git a/doc/cmd.rst b/doc/cmd.rst
index ad84a6ae..1aca89a8 100644
--- a/doc/cmd.rst
+++ b/doc/cmd.rst
@@ -477,14 +477,16 @@ You can specify the name of the output file with the ``-o`` switch.
Other common reporting options are described above in :ref:`cmd_reporting`.
+
.. _cmd_json:
JSON reporting
--------------
+--------------
The **json** command writes coverage data to a "coverage.json" file.
-You can specify the name of the output file with the ``-o`` switch.
+You can specify the name of the output file with the ``-o`` switch. The JSON
+can be nicely formatted by specifying the ``--pretty-print`` switch.
Other common reporting options are described above in :ref:`cmd_reporting`.
diff --git a/doc/config.rst b/doc/config.rst
index 84c77131..43d5a27e 100644
--- a/doc/config.rst
+++ b/doc/config.rst
@@ -302,21 +302,21 @@ identified as packages in the report. Directories deeper than this depth are
not reported as packages. The default is that all directories are reported as
packages.
+
.. _config_json:
[json]
------
+------
-Values particular to json reporting. The values in the ``[report]`` section
+Values particular to JSON reporting. The values in the ``[report]`` section
also apply to JSON output, where appropriate.
-``json_output`` (string, default "coverage.json"): where to write the json
-report.
+``output`` (string, default "coverage.json"): where to write the JSON file.
-``json_pretty_print`` (boolean, default false): controls if fields in the json
-are outputted with whitespace formatted for human consumption (True) or for
-minimum file size (False)
+``pretty_print`` (boolean, default false): controls if the JSON is outputted
+with whitespace formatted for human consumption (True) or for minimum file size
+(False).
-``json_show_contexts`` (boolean, default false): should the json report include
-an indication on each line of which contexts executed the line.
-See :ref:`dynamic_contexts` for details.
+``show_contexts`` (boolean, default false): should the JSON report include an
+indication of which contexts executed each line. See :ref:`dynamic_contexts`
+for details.