syncable_cli/analyzer/helmlint/
mod.rs

1//! Helmlint-RS: Native Rust Helm Chart Linter
2//!
3//! A Rust implementation of a comprehensive Helm chart linter, inspired by
4//! and partially derived from the helmtest project.
5//!
6//! # Attribution
7//!
8//! This module is a derivative work inspired by [helmtest](https://github.com/stackrox/helmtest),
9//! originally written in Go by StackRox (Red Hat).
10//!
11//! **Original Project:** <https://github.com/stackrox/helmtest>
12//! **Original License:** Apache-2.0
13//! **Original Copyright:** Copyright (c) StackRox, Inc.
14//!
15//! This Rust translation maintains compatibility with the Apache-2.0 license.
16//! See THIRD_PARTY_NOTICES.md and LICENSE files for full details.
17//!
18//! # Features
19//!
20//! - Chart.yaml validation (structure, versions, dependencies)
21//! - values.yaml validation (types, schema, unused values)
22//! - Template syntax analysis (unclosed blocks, undefined variables)
23//! - Security checks (privileged containers, host access)
24//! - Best practice validation (resource limits, probes, deprecated APIs)
25//! - Inline pragma support for ignoring rules
26//!
27//! # Example
28//!
29//! ```rust,ignore
30//! use syncable_cli::analyzer::helmlint::{lint_chart, HelmlintConfig, LintResult};
31//! use std::path::Path;
32//!
33//! let config = HelmlintConfig::default();
34//! let result = lint_chart(Path::new("./my-chart"), &config);
35//!
36//! for failure in result.failures {
37//!     println!("{}: {} - {}", failure.file, failure.code, failure.message);
38//! }
39//! ```
40//!
41//! # Rules
42//!
43//! | Category | Code Range | Description |
44//! |----------|------------|-------------|
45//! | Structure | HL1xxx | Chart.yaml and file structure |
46//! | Values | HL2xxx | values.yaml validation |
47//! | Templates | HL3xxx | Go template syntax |
48//! | Security | HL4xxx | Container security |
49//! | Best Practices | HL5xxx | K8s best practices |
50
51pub mod config;
52pub mod formatter;
53pub mod k8s;
54pub mod lint;
55pub mod parser;
56pub mod pragma;
57pub mod rules;
58pub mod types;
59
60// Re-export main types and functions
61pub use config::HelmlintConfig;
62pub use formatter::{OutputFormat, format_result, format_result_to_string};
63pub use lint::{LintResult, lint_chart, lint_chart_file};
64pub use types::{CheckFailure, RuleCode, Severity};