Skip to main content

rpm_spec_analyzer/
lib.rs

1//! Visitor-based static analyzer for RPM `.spec` files.
2//!
3//! Built on top of [`rpm_spec`]'s AST: lint rules implement [`Visit`] over
4//! `SpecFile<Span>` and surface findings as [`Diagnostic`]s.
5//!
6//! Entry point: [`session::LintSession`].
7
8#![forbid(unsafe_code)]
9#![warn(missing_debug_implementations)]
10// TODO(pre-1.0): document the public surface and remove this allow.
11// Currently 537 items lack `///` doc comments — chiefly per-rule
12// structs in `rules/` and per-layer config types. Tracked separately
13// from publication.
14#![allow(missing_docs)]
15
16pub mod config;
17pub mod diagnostic;
18pub(crate) mod files;
19pub mod lint;
20pub(crate) mod policy;
21pub mod registry;
22pub mod rules;
23pub mod session;
24pub(crate) mod shell;
25pub mod visit;
26
27pub use diagnostic::{Applicability, Diagnostic, Edit, Label, LintCategory, Severity, Suggestion};
28pub use lint::{Lint, LintMetadata};
29pub use session::{
30    LintSession, ParseOutcome, ParserDiagnostic, ParserSeverity, analyze, analyze_with_profile,
31    analyze_with_profile_at, parse,
32};
33pub use visit::Visit;
34
35pub use rpm_spec::ast::Span;
36pub use rpm_spec_profile as profile;