use crate::{Lint, LintSuite, LintingResult};
#[async_trait::async_trait]
pub trait Linter {
fn execute_lint<L: Lint<Output = O>, O>(&mut self, lint: L) -> LintingResult<O>;
async fn execute_suite<S: LintSuite<Output = O> + Send, O>(
&mut self,
suite: S,
) -> LintingResult<O> {
self.begin_suite(&suite.identifier(), &suite.title());
let outcome = self.execute_suite_checks(suite).await;
self.end_suite();
outcome
}
async fn execute_suite_checks<S: LintSuite<Output = O> + Send, O>(
&mut self,
suite: S,
) -> LintingResult<O>;
fn begin_suite(&mut self, identifier: &str, title: &str);
fn end_suite(&mut self);
}