pub struct LintConfig {
pub enabled: bool,
pub disabled_rules: Vec<String>,
pub rule_configs: BTreeMap<String, Value>,
}Expand description
Configuration for the SQL linter.
Controls which lint rules are enabled/disabled. By default, all rules are enabled.
Fields§
§enabled: boolMaster toggle for linting (default: true).
disabled_rules: Vec<String>List of rule codes to disable (e.g., [“LINT_AM_008”]).
rule_configs: BTreeMap<String, Value>Per-rule option objects keyed by rule reference (LINT_*, AL01,
aliasing.table, etc).
Implementations§
Source§impl LintConfig
impl LintConfig
Sourcepub fn is_rule_enabled(&self, code: &str) -> bool
pub fn is_rule_enabled(&self, code: &str) -> bool
Returns true if a specific rule is enabled.
Sourcepub fn rule_config_object(&self, code: &str) -> Option<&Map<String, Value>>
pub fn rule_config_object(&self, code: &str) -> Option<&Map<String, Value>>
Returns a rule-level config object, if present.
Sourcepub fn rule_option_str(&self, code: &str, key: &str) -> Option<&str>
pub fn rule_option_str(&self, code: &str, key: &str) -> Option<&str>
Returns a string option for a rule config.
Sourcepub fn rule_option_bool(&self, code: &str, key: &str) -> Option<bool>
pub fn rule_option_bool(&self, code: &str, key: &str) -> Option<bool>
Returns a boolean option for a rule config.
Sourcepub fn rule_option_usize(&self, code: &str, key: &str) -> Option<usize>
pub fn rule_option_usize(&self, code: &str, key: &str) -> Option<usize>
Returns an unsigned integer option for a rule config.
Sourcepub fn rule_option_string_list(
&self,
code: &str,
key: &str,
) -> Option<Vec<String>>
pub fn rule_option_string_list( &self, code: &str, key: &str, ) -> Option<Vec<String>>
Returns a list-of-string option for a rule config.
Sourcepub fn config_section_object(
&self,
section: &str,
) -> Option<&Map<String, Value>>
pub fn config_section_object( &self, section: &str, ) -> Option<&Map<String, Value>>
Returns an object for a named top-level config section.
Sourcepub fn section_option_str(&self, section: &str, key: &str) -> Option<&str>
pub fn section_option_str(&self, section: &str, key: &str) -> Option<&str>
Returns a string option from a named top-level config section.
Sourcepub fn section_option_bool(&self, section: &str, key: &str) -> Option<bool>
pub fn section_option_bool(&self, section: &str, key: &str) -> Option<bool>
Returns a boolean option from a named top-level config section.
Sourcepub fn section_option_usize(&self, section: &str, key: &str) -> Option<usize>
pub fn section_option_usize(&self, section: &str, key: &str) -> Option<usize>
Returns an unsigned integer option from a named top-level config section.
Sourcepub fn core_option_bool(&self, key: &str) -> Option<bool>
pub fn core_option_bool(&self, key: &str) -> Option<bool>
Returns a boolean option from the top-level SQLFluff core config map.
Trait Implementations§
Source§impl Clone for LintConfig
impl Clone for LintConfig
Source§fn clone(&self) -> LintConfig
fn clone(&self) -> LintConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LintConfig
impl Debug for LintConfig
Source§impl Default for LintConfig
impl Default for LintConfig
Source§impl<'de> Deserialize<'de> for LintConfig
impl<'de> Deserialize<'de> for LintConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for LintConfig
impl JsonSchema for LintConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more