Skip to main content

Crate rpm_spec_analyzer

Crate rpm_spec_analyzer 

Source
Expand description

Visitor-based static analyzer for RPM .spec files.

Built on top of rpm_spec’s AST: lint rules implement Visit over SpecFile<Span> and surface findings as Diagnostics.

Entry point: session::LintSession.

Re-exports§

pub use diagnostic::Applicability;
pub use diagnostic::Diagnostic;
pub use diagnostic::Edit;
pub use diagnostic::Label;
pub use diagnostic::LintCategory;
pub use diagnostic::Severity;
pub use diagnostic::Suggestion;
pub use lint::Lint;
pub use lint::LintMetadata;
pub use session::LintSession;
pub use session::ParseOutcome;
pub use session::ParserDiagnostic;
pub use session::ParserSeverity;
pub use session::analyze;
pub use session::analyze_with_profile;
pub use session::analyze_with_profile_at;
pub use session::parse;
pub use visit::Visit;
pub use rpm_spec_profile as profile;

Modules§

config
Lint configuration (the .rpmspec.toml schema).
diagnostic
Diagnostic types produced by lint rules.
lint
Lint trait and metadata.
registry
Central registry of built-in lint rules.
rules
Built-in lint rules. Add new ones here and register them in crate::registry::builtin_lints.
session
Lint session: parse a source, run configured lints, return diagnostics.
visit
Visitor trait for the rpm_spec AST.

Macros§

declare_missing_section_lint
Generate a “missing required %section” lint.
declare_missing_tag_lint
Generate a “missing required tag” lint.

Structs§

Span
Half-open range [start_byte, end_byte) into the original source string, annotated with 1-based line and column at both ends.