Skip to content

Advanced Features

Compact mode

Hide the per-module panels and show only the statistics tables:

docstr-health --compact

Useful in CI or when you only care about the aggregate score.

Include module docstrings

By default only functions, methods, and classes are checked. Add the module's own __doc__ to the analysis with:

docstr-health --doc-modules

Ignore tests

Skip test files and directories:

docstr-health --ignore-tests

This adds test_ to the exclusion patterns for the current run.

Short names

Display only the module file name instead of the full path:

docstr-health --short-names

Caching remote sources

Remote Git repositories and PyPI packages are cached under ~/.cache/docstr-health/repos/ so that repeated runs are fast.

  • --cache-dir PATH — use a custom cache location.
  • --no-cache — always fetch a fresh copy and delete it when done.
docstr-health --repo-url https://github.com/user/repo.git --cache-dir /tmp/cache
docstr-health --pypi-package requests --no-cache

Debug logging

Set debug = true in [tool.docstr-health] (or the packaged config.toml) to write verbose logs to ~/.cache/docstr-health/logs/app.log.

Combining options

Flags compose freely:

docstr-health ./src \
  --compact \
  --doc-modules \
  --ignore-tests \
  --short-names \
  --threshold-special 40