summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2018-04-19 07:08:17 -0400
committerNed Batchelder <ned@nedbatchelder.com>2018-04-19 07:08:17 -0400
commit0aed59a6c002c94e12a89b6c1400ecd0420dc2f9 (patch)
tree4e04e76d5e03ef01ef4903d235bf9c84292f8f44
parentc1f14311c417483b8d92c7d998f6ab0a71229f9d (diff)
downloadpython-coveragepy-0aed59a6c002c94e12a89b6c1400ecd0420dc2f9.tar.gz
Document COVERAGE_RCFILE
-rw-r--r--CHANGES.rst2
-rw-r--r--coverage/cmdline.py9
-rw-r--r--doc/config.rst5
3 files changed, 9 insertions, 7 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index 85db3b2..8028f1f 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -18,7 +18,7 @@ Unreleased (might become 4.6)
-----------------------------
- The location of the configuration file can now be specified with a
- `COVERAGE_RCFILE` environment variable, as requested in `issue 650`_.
+ ``COVERAGE_RCFILE`` environment variable, as requested in `issue 650`_.
- A new warning (already-imported) is issued if measurable files have already
been imported before coverage.py started measurement. See
diff --git a/coverage/cmdline.py b/coverage/cmdline.py
index 5baf07a..ea86b44 100644
--- a/coverage/cmdline.py
+++ b/coverage/cmdline.py
@@ -44,7 +44,7 @@ class Opts(object):
)
debug = optparse.make_option(
'', '--debug', action='store', metavar="OPTS",
- help="Debug options, separated by commas",
+ help="Debug options, separated by commas. [env: COVERAGE_DEBUG]",
)
directory = optparse.make_option(
'-d', '--directory', action='store', metavar="DIR",
@@ -116,8 +116,9 @@ class Opts(object):
rcfile = optparse.make_option(
'', '--rcfile', action='store',
help=(
- "Specify configuration file. "
- "By default '.coveragerc', 'setup.cfg' and 'tox.ini' are tried."
+ "Specify configuration file. "
+ "By default '.coveragerc', 'setup.cfg' and 'tox.ini' are tried. "
+ "[env: COVERAGE_RCFILE]"
),
)
source = optparse.make_option(
@@ -127,7 +128,7 @@ class Opts(object):
timid = optparse.make_option(
'', '--timid', action='store_true',
help=(
- "Use a simpler but slower trace method. Try this if you get "
+ "Use a simpler but slower trace method. Try this if you get "
"seemingly impossible results!"
),
)
diff --git a/doc/config.rst b/doc/config.rst
index c1fb4b1..062aa74 100644
--- a/doc/config.rst
+++ b/doc/config.rst
@@ -33,8 +33,9 @@ configuration file are tied to your source code and how it should be measured,
so it should be stored with your source, and checked into source control,
rather than put in your home directory.
-A different name for the configuration file can be specified with the
-``--rcfile=FILE`` command line option.
+A different location for the configuration file can be specified with the
+``--rcfile=FILE`` command line option or with the ``COVERAGE_RCFILE``
+environment variable.
Coverage.py will read settings from other usual configuration files if no other
configuration file is used. It will automatically read from "setup.cfg" or