Skip to content

Commit

Permalink
chore: remove unnecessary methods
Browse files Browse the repository at this point in the history
  • Loading branch information
benfdking committed Dec 4, 2024
1 parent 8891c88 commit 9097fcb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
3 changes: 1 addition & 2 deletions crates/lib/src/api/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ pub fn lint_with_formatter(
) -> Result<Vec<SQLBaseError>, SQLFluffUserError> {
let cfg = get_simple_config(dialect.into(), None, exclude_rules, config_path)?;

let mut linter = Linter::new(cfg, None, None);
linter.set_formatter(formatter);
let mut linter = Linter::new(cfg, formatter, None);

let mut result = linter.lint_string_wrapped(sql, None, false);

Expand Down
4 changes: 0 additions & 4 deletions crates/lib/src/core/linter/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -641,10 +641,6 @@ impl Linter {
&mut self.config
}

pub fn set_formatter(&mut self, formatter: Option<OutputStreamFormatter>) {
self.formatter = formatter;
}

pub fn rules(&self) -> &[ErasedRule] {
self.rules.get_or_init(|| self.get_rulepack().rules)
}
Expand Down

0 comments on commit 9097fcb

Please sign in to comment.