Expand description
Core types shared between the nginx-lint CLI and WASM plugins.
This crate provides the foundational types used throughout the nginx-lint ecosystem: lint rule definitions, error reporting, configuration management, and ignore comment support.
§Modules
linter— Core lint types:LintRuletrait,LintError,Severity,Fixconfig— Configuration loaded from.nginx-lint.toml(LintConfig,ValidationError)ignore—# nginx-lint-ignorecomment parsing and error filteringdocs— Rule documentation extraction (RuleDoc)
§Quick reference
| Type | Purpose |
|---|---|
LintRule | Trait that every lint rule (native or WASM) implements |
LintError | A single lint diagnostic with location, severity, and optional fixes |
Severity | Error or Warning |
Fix | An auto-fix action (replace, delete, insert) |
LintConfig | Settings loaded from .nginx-lint.toml |
Linter | Container that holds rules and runs them against a parsed config |
§Re-exports
The [parser] module re-exports the entire [nginx_lint_parser] crate,
giving access to parse_config, parse_string, and the AST types.
Re-exports§
pub use config::Color;pub use config::ColorConfig;pub use config::ColorMode;pub use config::IncludeConfig;pub use config::LintConfig;pub use config::PathMapping;pub use config::ValidationError;pub use docs::RuleDoc;pub use docs::RuleDocOwned;pub use ignore::FilterResult;pub use ignore::IgnoreTracker;pub use ignore::IgnoreWarning;pub use ignore::filter_errors;pub use ignore::parse_context_comment;pub use linter::Fix;pub use linter::LintError;pub use linter::LintRule;pub use linter::Linter;pub use linter::RULE_CATEGORIES;pub use linter::Severity;pub use linter::apply_fixes_to_content;pub use linter::compute_line_starts;pub use linter::normalize_line_fix;pub use nginx_lint_parser as parser;
Modules§
- config
- Configuration management for nginx-lint.
- docs
- Rule documentation types for nginx-lint
- ignore
- Ignore comment support for nginx-lint
- linter
- Core types for the lint engine: rule definitions, error reporting, and fix proposals.
Functions§
- parse_
config - Parse a nginx configuration file from disk
- parse_
string - Parse nginx configuration from a string
- parse_
string_ with_ errors - Parse nginx configuration from a string, returning AST even when syntax errors exist.