How it works

PragyaLint runs in three stages: build a graph, compute reachability, then run each rule against the result.

1. Discovery

PragyaLint walks your project directory (respecting --ignore patterns and skipping __pycache__, node_modules, site-packages, and virtualenv directories automatically) and parses every matching file with the standard-library ast module.

2. Module graph

For each file, PragyaLint extracts:

These become a directed graph: modules are nodes, imports are edges.

3. Reachability

Starting from every entry-point module, PragyaLint walks the import graph outward. Any module never reached this way is flagged high-confidence dead (rule unused_file). Anything reached but containing exports nothing else imports gets checked by the remaining rules. See Analysis rules for the full rule set.

4. Dynamic-dispatch check

Before finalizing findings, PragyaLint scans the whole project for patterns that can hide real usage from the graph: dispatch tables, getattr(), exec/eval, globals()/locals(). Names used this way are excluded from findings entirely where resolvable, or the rest of the project's findings are downgraded to LOW confidence where not. Full detail on Dynamic dispatch.

5. Report

Every remaining issue becomes a Finding: a rule name, a confidence level, a message, and a file/line location. These render to your terminal by default, or as JSON/SARIF with --json/--sarif — see Reports.