Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ To view all options available, run ``interrogate --help``:
--color / --no-color Toggle color output on/off when printing to
stdout. [default: True]

--omit-covered-files Omit reporting files that have 100%
--omit-covered-files Omit reporting files that meet --fail-under
documentation coverage. This option is
ignored if verbosity is not set. [default:
False]
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Command Line Options

.. option:: --omit-covered-files

Omit reporting files that have 100% documentation coverage.
Omit reporting files that meet --fail-under documentation coverage.
This option is ignored if verbosity is not set. [default: ``False``]

.. option:: -g, --generate-badge PATH
Expand Down
4 changes: 2 additions & 2 deletions src/interrogate/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@
default=False,
show_default=True,
help=(
"Omit reporting files that have 100% documentation coverage. This "
"option is ignored if verbosity is not set."
"Omit reporting files that meet --fail-under documentation coverage. "
"This option is ignored if verbosity is not set."
),
)
@click.option(
Expand Down
2 changes: 1 addition & 1 deletion src/interrogate/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class InterrogateConfig:
:param bool ignore_init_module: Ignore ``__init__.py`` modules.
:param str include_regex: Regex identifying class, method, and
function names to include.
:param bool omit_covered_files: Omit reporting files that have 100%
:param bool omit_covered_files: Omit reporting files that meet --fail-under
documentation coverage.
"""

Expand Down
13 changes: 7 additions & 6 deletions src/interrogate/coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def _sort_nodes(x):
for file_result in combined_results.file_results:
if (
self.config.omit_covered_files
and file_result.perc_covered == 100
and file_result.perc_covered >= self.config.fail_under
):
continue
nodes = file_result.nodes
Expand All @@ -316,7 +316,8 @@ def _print_detailed_table(self, results):
"""Print detailed table to the given output stream."""
detailed_table = self._create_detailed_table(results)

# don't print an empty table if --omit-covered & all files have 100%
# don't print an empty table if --omit-covered & all files meet
# --fail-under
if len(detailed_table) < 3:
return

Expand Down Expand Up @@ -349,7 +350,7 @@ def _create_summary_table(self, combined_results):
filename = self._get_filename(file_result.filename)
if (
self.config.omit_covered_files
and file_result.perc_covered == 100
and file_result.perc_covered >= self.config.fail_under
):
continue
perc_covered = "{:.0f}%".format(file_result.perc_covered)
Expand Down Expand Up @@ -436,7 +437,7 @@ def _get_header_base(self):
return base + "/"

def _print_omitted_file_count(self, results):
"""Print # of files omitted due to 100% coverage and --omit-covered.
"""Print # of files omitted due to --fail-under and --omit-covered.

:param InterrogateResults results: results of docstring coverage
interrogation.
Expand All @@ -445,7 +446,7 @@ def _print_omitted_file_count(self, results):
return

omitted_files = [
r for r in results.file_results if r.perc_covered == 100
r for r in results.file_results if r.perc_covered >= self.config.fail_under
]
omitted_file_count = len(omitted_files)
if omitted_file_count == 0:
Expand All @@ -455,7 +456,7 @@ def _print_omitted_file_count(self, results):
files_humanized = "files" if total_files_scanned > 1 else "file"
files_skipped = (
f"({omitted_file_count} of {total_files_scanned} {files_humanized} "
"omitted due to complete coverage)"
"omitted due to met coverage)"
)
to_print = tabulate.tabulate(
[self.output_formatter.TABLE_SEPARATOR, [files_skipped]],
Expand Down