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
commitc5e3f3751d1ea54b8e75b0d589f8912c4aaa63c6 (patch)
tree9ac596a340900cb1e47bd8621b476286ae66feda
parent3d3dfc871f102f64737883ea78777a89b6126794 (diff)
downloadpython-coveragepy-git-c5e3f3751d1ea54b8e75b0d589f8912c4aaa63c6.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 85db3b2e..8028f1fd 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 5baf07a0..ea86b445 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 c1fb4b1b..062aa740 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