PragyaLint runs in three stages: build a graph, compute reachability, then run each rule against the result.
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.
For each file, PragyaLint extracts:
import and from ... import statement, resolved to a module name.__all__ list, if present).These become a directed graph: modules are nodes, imports are edges.
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.
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.
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.