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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
//! Analysis engine for pedant: IR extraction, capability detection, and style checks.
//!
//! `pedant-core` provides the core analysis pipeline without CLI dependencies.
//! It presents two surfaces over one module tree, selected by feature.
//!
//! The **substrate** is present in every configuration. It answers factual
//! questions about source text: [`ir`] extracts facts, [`capabilities`] resolves
//! them to capabilities, [`resolution`] models the Cargo project those files
//! belong to, and [`hash`] and [`pattern`] support them. No substrate entry
//! point accepts policy input.
//!
//! The **judgment** surface sits behind the `checks` feature, which is on by
//! default. It answers acceptability questions and owns every type whose shape
//! is determined by an opinion: the check catalog, the gate rules engine, check
//! configuration, violations, and the orchestrating `lint` entry points. A
//! consumer that wants facts without opinions takes `default-features = false`.
//!
//! `semantic` is a third, orthogonal axis. It combines with either surface, and
//! enabling `checks` does not enable it.
//!
//! # Quick start
//!
//! ```
//! use pedant_core::capabilities::detect_capabilities;
//! use pedant_core::ir::extract;
//! use pedant_types::Capability;
//!
//! let syntax = syn::parse_file("use std::fs;").expect("source parses");
//! let ir = extract("example.rs", &syntax, None);
//! let profile = detect_capabilities(&ir, None);
//!
//! assert_eq!(profile.findings[0].capability, Capability::FileRead);
//! ```
/// Violations + capabilities produced by a single analysis run.
/// Path-based capability detection over extracted IR facts.
/// `.pedant.toml` schema, loading, and per-path override resolution.
/// Check catalog: metadata, rationale, and the `ViolationType` enum.
/// Security gate rules that fire on suspicious capability combinations.
/// BFS and pairwise-edge helpers for type-relationship graphs.
pub
/// SHA-256 hashing of source contents for attestation.
/// Intermediate representation extracted from the AST in one pass.
/// JSON serialization for machine-readable violation output.
/// High-level analysis entry points and error types.
///
/// ```
/// use pedant_core::{lint_str, Config};
///
/// let config = Config::default();
/// let result = lint_str("fn f() { if true { if false {} } }", &config).unwrap();
/// assert!(!result.violations.is_empty());
/// ```
/// Observation hooks the proof feature reads; inert in ordinary builds.
pub
/// Glob and wildcard matching for AST node text and file paths.
/// Whole-workspace structural checks over the file tree and Cargo metadata.
/// Language-scoped project and symbol-resolution models.
/// Style checks that consume IR facts and produce violations.
/// The `Violation` type, display formatting, and check rationale.
pub use AnalysisResult;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
/// Alias for `syn::Error`, used by consumers that parse source themselves.
pub use Error as ParseError;
pub use FunctionAnalysisSummary;
pub use ;