bevy_lint/lints/restriction/
mod.rs1use rustc_lint::{Level, Lint, LintStore};
10
11use crate::lint::LintGroup;
12
13pub mod missing_reflect;
14pub mod missing_trait_for_unit_struct;
15pub mod panicking_methods;
16pub mod schedule;
17
18pub(crate) struct Restriction;
19
20impl LintGroup for Restriction {
21 const NAME: &str = "bevy::restriction";
22 const LEVEL: Level = Level::Allow;
23 const LINTS: &[&Lint] = &[
24 missing_reflect::MISSING_REFLECT,
25 missing_trait_for_unit_struct::MISSING_CLONE,
26 missing_trait_for_unit_struct::MISSING_COPY,
27 missing_trait_for_unit_struct::MISSING_DEFAULT,
28 panicking_methods::PANICKING_METHODS,
29 schedule::FIXED_UPDATE_SCHEDULE,
30 schedule::UPDATE_SCHEDULE,
31 ];
32
33 fn register_passes(store: &mut LintStore) {
34 store.register_late_pass(|_| Box::new(missing_reflect::MissingReflect));
35 store.register_late_pass(|_| {
36 Box::new(missing_trait_for_unit_struct::MissingTraitForUnitStruct)
37 });
38 store.register_late_pass(|_| Box::new(panicking_methods::PanickingMethods));
39 store.register_late_pass(|_| Box::new(schedule::Schedule));
40 }
41}