Configuration

PragyaLint reads settings from pragyalint.toml, pragyalint.json, or the [tool.pragyalint] table in your pyproject.toml. CLI flags always take precedence.

Example pragyalint.toml

[pragyalint]
include = ["src"]
exclude = ["src/generated"]
entries = ["src/main.py", "src/app.py"]

[reporter]
format = "pretty"

[ci]
fail-on = "high"
json = true

Options

OptionTypeDefaultDescription
include string[] ["."] Directories/files to scan.
exclude string[] [] Paths to ignore (gitignore-style patterns supported).
entries string[] auto Explicit entry-point files. Auto-detected if unset.
reporter.format string "pretty" Output format: pretty, compact.
ci.fail-on string "" Exit non-zero if findings at/above this confidence exist.
ci.json bool false Emit a JSON report.
ci.sarif bool false Emit a SARIF report for Code Scanning.

Using pyproject.toml

Add a [tool.pragyalint] table to keep everything in one file:

[tool.pragyalint]
include = ["src"]
fail-on = "high"

Precedence

  1. CLI arguments (highest)
  2. pragyalint.toml / pragyalint.json (found in CWD)
  3. [tool.pragyalint] in pyproject.toml
  4. Built-in defaults (lowest)

Config discovery

PragyaLint looks for pragyalint.toml first, then pragyalint.json, then pyproject.toml, walking up from the current working directory.

Note: the exact option names in this reference match the CLI flags (dashes become underscores). Check pragyalint --help for the current list if anything differs.