Skip to content

nf lint

Evaluate offline schema and policy rules against a Netherframe app using installed lint packs, without configuring providers, reading state, or calling remote APIs.

Synopsis

nf lint --app MODULE:ATTR [OPTIONS]

Options

Option Default Description
--app TEXT (required) Trusted Python app or zero-argument factory (module.path:attribute).
--pack TEXT All installed packs Installed lint pack name (for example, hashicorp.aws). Repeatable.
--all-failures / --first-failure --all-failures Show every finding or only the first in text output; full evaluation always runs and --json always includes all findings.
--require-resolved Off Also fail when any checked attribute remains unknown/deferred.
--json Off Emit the complete lint report as JSON on stdout.

Exit codes

Code Meaning
0 Valid report: at least one check ran, zero findings (and zero deferred checks if --require-resolved is set).
1 Findings reported, unresolved checks under --require-resolved, no rules installed, or zero checks evaluated.
2 CLI usage error.

Examples

# Run all installed packs against an app
nf lint --app infra.app:app

# Run only the AWS pack and output JSON for CI
nf lint --app infra.app:app --pack hashicorp.aws --json

# Fail on unresolved runtime references as well
nf lint --app infra.app:app --require-resolved

Notes

  • Installing a lint pack (such as netherframe.lint.hashicorp.aws) does not run checks automatically during nf plan or nf apply; linting is always explicit.
  • --app imports and executes the named Python module/factory, so lint only trusted code.
  • Python API equivalent: Project().lint(app_spec, pack_names=..., require_resolved=...) or app.lint(...).