1#![warn(missing_docs)]
8
9pub mod config;
10pub mod extract;
11pub mod hash;
12pub mod language;
13mod normalize;
14pub mod scan;
15
16use std::path::PathBuf;
17
18pub use config::{Config, IdentMode, Level, NORMALIZER_VERSION};
19pub use extract::{
20 FileFeatures, FunctionFeatures, LevelFeatures, extract_bytes, extract_file, extract_source,
21};
22pub use hash::{Fingerprint, Hash128};
23pub use language::Language;
24pub use scan::{SourceFile, discover, extract_all, slash_path};
25
26#[derive(Debug, thiserror::Error)]
28pub enum Error {
29 #[error("{0}: {1}")]
31 Io(PathBuf, #[source] std::io::Error),
32 #[error("parse error: {0}")]
34 Parse(String),
35 #[error("directory walk error: {0}")]
37 Walk(String),
38 #[error("invalid configuration: {0}")]
40 InvalidConfig(String),
41}