Skip to main content

kcl_lib/lint/
mod.rs

1pub mod checks;
2mod rule;
3
4pub use rule::Discovered;
5pub use rule::Finding;
6pub use rule::FindingFamily;
7pub use rule::Rule;
8pub use rule::lint_and_fix_all;
9pub use rule::lint_and_fix_families;
10
11/// Controls opt-in lint rules that are not ready for all KCL consumers.
12#[derive(Debug, Clone, Copy, Default)]
13pub struct LintOptions {
14    /// Enable the Z0006 deprecated edge API migration lint.
15    enable_z0006: bool,
16}
17
18impl LintOptions {
19    /// Include the Z0006 deprecated edge API migration lint.
20    pub fn with_z0006(mut self, enable: bool) -> Self {
21        self.enable_z0006 = enable;
22        self
23    }
24
25    pub(crate) fn z0006_enabled(self) -> bool {
26        self.enable_z0006
27    }
28}