pub use types::Lint;
use crate::{analysis::types::LintT, syntax::AstModule};
mod bind;
mod dubious;
mod exported;
mod flow;
mod incompatible;
mod names;
mod performance;
mod types;
impl AstModule {
pub fn lint(&self, globals: Option<&[&str]>) -> Vec<Lint> {
let mut res = Vec::new();
res.extend(flow::flow_issues(self).into_iter().map(LintT::erase));
res.extend(
incompatible::incompatibilities(self)
.into_iter()
.map(LintT::erase),
);
res.extend(dubious::dubious(self).into_iter().map(LintT::erase));
res.extend(
names::name_warnings(self, globals)
.into_iter()
.map(LintT::erase),
);
res.extend(performance::performance(self).into_iter().map(LintT::erase));
res
}
}