Skip to main content

Module validate

Module validate 

Source
Expand description

Validation for Nix flake expressions.

  • error: ValidationError, Severity, Location.
  • syntax (private): rnix parse errors and duplicate-attribute detection.
  • follows (crate-private): cycle, stale, target, contradiction, and depth lints.

validate runs the syntax-level lints. validate_full adds the follows-graph lints that need a parsed InputMap and an optional FlakeLock.

Re-exports§

pub use error::DuplicateAttr;
pub use error::Location;
pub use error::Severity;
pub use error::ValidationError;
pub use error::ValidationResult;

Modules§

error
ValidationError, Severity, and Location.

Functions§

validate
Run the syntax-level lints over source: parse errors, duplicate attributes, and the always-on declared-cycle check.
validate_full
Run syntax checks plus every follows-graph lint.
validate_speculative
Like validate_full but skips the lock-drift lints (lint_follows_stale and lint_follows_stale_lock) that compare declared edges in flake.nix against flake.lock.