Skip to main content

assert-no-linter-config-files

A command-line tool that asserts there are no configuration files (or embedded configuration sections) for common linters in your codebase. This is useful for enforcing that linter configurations are managed centrally rather than in individual repositories.

Usage

assert-no-linter-config-files --linters LINTERS [OPTIONS] DIRECTORY [DIRECTORY ...]

Required Arguments

  • --linters LINTERS - Comma-separated linters to check: jscpd,markdownlint,mypy,pylint,pytest,yamllint
  • DIRECTORY - One or more directories to scan

Optional Arguments

  • --exclude PATTERN - Glob pattern to exclude paths (repeatable)
  • --quiet - Suppress output, exit code only
  • --count - Print finding count only
  • --json - Output findings as JSON
  • --fail-fast - Exit on first finding
  • --warn-only - Always exit 0, report only

Exit Codes

  • 0 - No linter configuration found (or --warn-only)
  • 1 - One or more linter configurations found
  • 2 - Usage/runtime error (invalid args, unreadable files)

Examples

Check for pylint and mypy configs in the current directory:

assert-no-linter-config-files --linters pylint,mypy .

Check specific directories:

assert-no-linter-config-files --linters pylint,mypy src/ tests/

Check all linters:

assert-no-linter-config-files --linters pylint,mypy,pytest,yamllint,jscpd .

Exclude vendor directories:

assert-no-linter-config-files --linters pylint,mypy \
  --exclude "*vendor*" --exclude "*node_modules*" .

Get JSON output for CI integration:

assert-no-linter-config-files --linters pylint --json . | jq .

Use in CI to enforce no local linter configs:

assert-no-linter-config-files --linters pylint,mypy . || exit 1

What It Checks

Dedicated Config Files

The tool flags the presence of these files anywhere in the scanned tree:

jscpd: .jscpd.json, .jscpd.yml, .jscpd.yaml, .jscpd.toml, .jscpdrc, .jscpdrc.json, .jscpdrc.yml, .jscpdrc.yaml

markdownlint: .markdownlint.json, .markdownlint.jsonc, .markdownlint.yaml, .markdownlint.yml, .markdownlintrc

mypy: mypy.ini, .mypy.ini

pylint: .pylintrc, pylintrc, .pylintrc.toml

pytest: pytest.ini

yamllint: .yamllint, .yamllint.yml, .yamllint.yaml

Embedded Config Sections

The tool also checks shared config files for tool-specific sections:

pyproject.toml:

  • [tool.jscpd]
  • [tool.mypy]
  • [tool.pylint] or [tool.pylint.*]
  • [tool.pytest.ini_options]
  • [tool.yamllint]

setup.cfg:

  • [mypy]
  • Any section containing "pylint"
  • [tool:pytest]

tox.ini:

  • [mypy]
  • Any section containing "pylint"
  • [pytest] or [tool:pytest]

Output Format

When findings are detected, each is printed on a separate line:

<path>:<tool>:<reason>

Examples:

./pytest.ini:pytest:config file
./pyproject.toml:mypy:tool.mypy section
./setup.cfg:pylint:pylint.messages_control section

With --json:

[{"path": "./pytest.ini", "tool": "pytest", "reason": "config file"}]

Metadata

Release files for assert-no-linter-config-files 20260221123803

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for assert-no-linter-config-files 20260221123803
File Size Uploaded Provenance
assert_no_linter_config_files-20260221123803.tar.gz 32.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for assert-no-linter-config-files 20260221123803
File Interpreter ABI Platform
assert_no_linter_config_files-20260221123803-py3-none-any.whl Python 3 none any Details

Total release size: 45.2 kB

Release files / assert_no_linter_config_files-20260221123803.tar.gz

Download URL assert_no_linter_config_files-20260221123803.tar.gz
Size 32.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4c110316566e2a16f8a4e781f9ada41a161fc4ed116aae506401a724126a3eaf
BLAKE2b-256 checksum
How to use checksums
6be6e1071b31345733361b9429d5889bc0e518544d629ebf611063a2c04015f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 21, 2026.

Transparency log

Release files / assert_no_linter_config_files-20260221123803-py3-none-any.whl

Download URL assert_no_linter_config_files-20260221123803-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9038e1611863be8292a4eda2bc519c34f17129c1a58818706e2c1ac801317658
BLAKE2b-256 checksum
How to use checksums
96dd3136063d562ec65f427671b524f0f11bba192b1f884905b51dc6c5b02e1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 21, 2026.

Transparency log

Security for assert-no-linter-config-files 20260221123803

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for assert_no_linter_config_files-20260221123803.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page