pub struct HelmlintConfig {
pub ignored_rules: HashSet<String>,
pub severity_overrides: HashMap<String, Severity>,
pub failure_threshold: Severity,
pub disable_ignore_pragma: bool,
pub no_fail: bool,
pub k8s_version: Option<String>,
pub values_schema_path: Option<PathBuf>,
pub strict: bool,
pub fixable_only: bool,
pub exclude_patterns: Vec<String>,
}Expand description
Configuration for the helmlint linter.
Fields§
§ignored_rules: HashSet<String>Rules to ignore (by code, e.g., “HL1001”).
severity_overrides: HashMap<String, Severity>Severity overrides for specific rules.
failure_threshold: SeverityMinimum severity threshold for reporting.
disable_ignore_pragma: boolIf true, ignore inline pragma comments.
no_fail: boolIf true, don’t fail even if errors are found.
k8s_version: Option<String>Target Kubernetes version for API deprecation checks.
values_schema_path: Option<PathBuf>Path to a JSON schema for values.yaml validation.
strict: boolStrict mode - treat warnings as errors.
fixable_only: boolOnly report fixable issues.
exclude_patterns: Vec<String>Files or patterns to exclude.
Implementations§
Source§impl HelmlintConfig
impl HelmlintConfig
Sourcepub fn ignore_all(
self,
rules: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn ignore_all( self, rules: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Add multiple rules to ignore.
Sourcepub fn with_severity(self, rule: impl Into<String>, severity: Severity) -> Self
pub fn with_severity(self, rule: impl Into<String>, severity: Severity) -> Self
Override severity for a specific rule.
Sourcepub fn with_threshold(self, threshold: Severity) -> Self
pub fn with_threshold(self, threshold: Severity) -> Self
Set the failure threshold.
Sourcepub fn with_k8s_version(self, version: impl Into<String>) -> Self
pub fn with_k8s_version(self, version: impl Into<String>) -> Self
Set the target Kubernetes version.
Sourcepub fn with_values_schema(self, path: impl Into<PathBuf>) -> Self
pub fn with_values_schema(self, path: impl Into<PathBuf>) -> Self
Set the values schema path.
Sourcepub fn with_strict(self, strict: bool) -> Self
pub fn with_strict(self, strict: bool) -> Self
Enable strict mode.
Sourcepub fn is_rule_ignored(&self, code: &str) -> bool
pub fn is_rule_ignored(&self, code: &str) -> bool
Check if a rule is ignored.
Sourcepub fn effective_severity(&self, code: &str, default: Severity) -> Severity
pub fn effective_severity(&self, code: &str, default: Severity) -> Severity
Get the effective severity for a rule.
Sourcepub fn should_report(&self, severity: Severity) -> bool
pub fn should_report(&self, severity: Severity) -> bool
Check if a severity should be reported based on threshold.
Sourcepub fn is_excluded(&self, path: &str) -> bool
pub fn is_excluded(&self, path: &str) -> bool
Check if a file is excluded.
Sourcepub fn parse_k8s_version(&self) -> Option<(u32, u32)>
pub fn parse_k8s_version(&self) -> Option<(u32, u32)>
Parse Kubernetes version string to (major, minor).
Trait Implementations§
Source§impl Clone for HelmlintConfig
impl Clone for HelmlintConfig
Source§fn clone(&self) -> HelmlintConfig
fn clone(&self) -> HelmlintConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HelmlintConfig
impl Debug for HelmlintConfig
Auto Trait Implementations§
impl Freeze for HelmlintConfig
impl RefUnwindSafe for HelmlintConfig
impl Send for HelmlintConfig
impl Sync for HelmlintConfig
impl Unpin for HelmlintConfig
impl UnwindSafe for HelmlintConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more