Module linter

Module linter 

Source
Expand description

Core types for the lint engine: rule definitions, error reporting, and fix proposals.

This module contains the fundamental abstractions used by both native Rust rules (in src/rules/) and WASM plugin rules:

  • LintRule — trait that every rule implements
  • LintError — a single diagnostic produced by a rule
  • Severity — error vs. warning classification
  • Fix — an auto-fix action attached to a diagnostic
  • Linter — collects rules and runs them against a parsed config

Structs§

Fix
Represents a fix that can be applied to resolve a lint error
LintError
A single lint diagnostic produced by a rule.
Linter
Container that holds LintRules and runs them against a parsed config.

Enums§

Severity
Severity level of a lint diagnostic.

Constants§

RULE_CATEGORIES
Display-ordered list of rule categories for UI output.

Traits§

LintRule
A lint rule that can be checked against a parsed nginx configuration.

Functions§

apply_fixes_to_content
Apply fixes to content string.
compute_line_starts
Compute the byte offset of the start of each line (1-indexed).
normalize_line_fix
Convert a line-based Fix into an offset-based one using precomputed line starts.