bevy_lint/lints/pedantic/
mod.rs1use rustc_lint::{Level, Lint, LintStore};
10
11use crate::lint::LintGroup;
12
13pub mod borrowed_reborrowable;
14pub mod main_return_without_appexit;
15
16pub(crate) struct Pedantic;
17
18impl LintGroup for Pedantic {
19 const NAME: &str = "bevy::pedantic";
20 const LEVEL: Level = Level::Allow;
21 const LINTS: &[&Lint] = &[
22 borrowed_reborrowable::BORROWED_REBORROWABLE,
23 main_return_without_appexit::MAIN_RETURN_WITHOUT_APPEXIT,
24 ];
25
26 fn register_passes(store: &mut LintStore) {
27 store.register_late_pass(|_| {
28 Box::new(borrowed_reborrowable::BorrowedReborrowable::default())
29 });
30 store.register_late_pass(|_| {
31 Box::new(main_return_without_appexit::MainReturnWithoutAppExit::default())
32 });
33 }
34}