Struct sqruff_lib::core::config::FluffConfig
source · pub struct FluffConfig {
pub indentation: FluffConfigIndentation,
/* private fields */
}
Expand description
The class that actually gets passed around as a config object.
Fields§
§indentation: FluffConfigIndentation
Implementations§
source§impl FluffConfig
impl FluffConfig
pub fn new( configs: Option<HashSet<String>>, extra_config_path: Option<String>, indentation: Option<FluffConfigIndentation>, dialect: Option<&str> ) -> Self
pub fn with_sql_file_exts(self, exts: Vec<String>) -> Self
sourcepub fn from_root(
extra_config_path: Option<String>,
_ignore_local_config: bool,
_overrides: Option<HashMap<String, String>>
) -> Result<FluffConfig, SQLFluffUserError>
pub fn from_root( extra_config_path: Option<String>, _ignore_local_config: bool, _overrides: Option<HashMap<String, String>> ) -> Result<FluffConfig, SQLFluffUserError>
Loads a config object just based on the root directory.
pub fn from_kwargs( config: Option<FluffConfig>, dialect: Option<Dialect>, rules: Option<Vec<String>> ) -> Self
sourcepub fn process_raw_file_for_config(&mut self, raw_str: &str)
pub fn process_raw_file_for_config(&mut self, raw_str: &str)
Process a full raw file for inline config and update self.
sourcepub fn process_inline_config(&mut self, _config_line: &str)
pub fn process_inline_config(&mut self, _config_line: &str)
Process an inline config command and update self.
sourcepub fn verify_dialect_specified(&self) -> Option<SQLFluffUserError>
pub fn verify_dialect_specified(&self) -> Option<SQLFluffUserError>
Check if the config specifies a dialect, raising an error if not.
pub fn get_dialect(&self) -> Dialect
pub fn sql_file_exts(&self) -> &[String]
Trait Implementations§
source§impl Clone for FluffConfig
impl Clone for FluffConfig
source§fn clone(&self) -> FluffConfig
fn clone(&self) -> FluffConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FluffConfig
impl Debug for FluffConfig
source§impl Default for FluffConfig
impl Default for FluffConfig
source§fn default() -> FluffConfig
fn default() -> FluffConfig
Returns the “default value” for a type. Read more
source§impl PartialEq for FluffConfig
impl PartialEq for FluffConfig
source§fn eq(&self, other: &FluffConfig) -> bool
fn eq(&self, other: &FluffConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for FluffConfig
Auto Trait Implementations§
impl RefUnwindSafe for FluffConfig
impl Send for FluffConfig
impl Sync for FluffConfig
impl Unpin for FluffConfig
impl UnwindSafe for FluffConfig
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
Mutably borrows from an owned value. Read more