1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! # okf-validator: conformance checking and linting for OKF bundles
//!
//! Companion to [`okf-core`](https://docs.rs/okf-core), the pure-Rust
//! implementation of the [Open Knowledge Format (OKF) v0.2][spec]. This crate
//! judges bundles; okf-core models them.
//!
//! - [`validate`] checks ยง11 conformance: [`validate_bundle`] reports only
//! true spec violations as [`Severity::Error`], with optional-family
//! problems surfaced as warnings and infos, never as rejections.
//! - [`lint`] is the opinionated companion: [`lint_bundle`] goes beyond
//! conformance and flags the hygiene issues a continuously-authored corpus
//! drifts into, each finding tagged with a stable rule code.
//!
//! Staleness checks depend on the wall clock, so they are opt-in via
//! [`validate_bundle_at`] and [`lint_bundle_at`], which take the date to
//! compare against; the plain variants are deterministic.
//!
//! Most users get this crate through the [`okf`](https://docs.rs/okf) crate,
//! which re-exports it alongside okf-core and ships the `okf` CLI.
//!
//! ```no_run
//! use okf_core::Bundle;
//! use okf_validator::validate_bundle;
//!
//! let bundle = Bundle::load("./my_bundle")?;
//! let report = validate_bundle(&bundle);
//! if report.is_conformant() {
//! println!("conformant OKF v0.2 bundle");
//! }
//! # Ok::<(), okf_core::BundleError>(())
//! ```
//!
//! [spec]: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/main/SPEC.md
// Pedantic and nursery lints keep the published crate tidy; the few cases
// where a lint is genuinely wrong for this codebase are silenced inline with a
// justification.
pub use ;
pub use ;