lintel-config
Configuration types and loader for Lintel. Defines the lintel.toml schema, parses config files, and provides utilities for schema URI rewriting and path resolution.
Features
- Config types —
ConfigandOverridestructs with serde deserialization and JSON Schema generation via schemars - Hierarchical loading — walks up the directory tree merging
lintel.tomlfiles untilroot = true - URI rewriting — prefix-based rewrite rules with longest-prefix-wins semantics
//path resolution — resolve//-prefixed paths relative to the config directory- Schema generation — generates the JSON Schema for
lintel.toml(used at build time bylintel-checkand as a standalone binary)
Usage
use ;
// Load config by walking up from a directory
let config = find_and_load?
.unwrap_or_default;
// Check for custom schema mappings
if let Some = config.find_schema_mapping
// Apply rewrite rules and resolve // paths
let uri = apply_rewrites;
let uri = resolve_double_slash;
Standalone binary
Prints the JSON Schema for lintel.toml to stdout.