bevy_lint/lints/nursery/
mod.rs

1//! Unstable lints that may be removed at any time for any reason.
2//!
3//! These lints are **allow** by default.
4
5use rustc_lint::{Level, Lint, LintStore};
6
7use crate::lint::LintGroup;
8
9pub mod camera_modification_in_fixed_update;
10pub mod duplicate_bevy_dependencies;
11pub mod zst_query;
12
13pub(crate) struct Nursery;
14
15impl LintGroup for Nursery {
16    const NAME: &str = "bevy::nursery";
17    const LEVEL: Level = Level::Allow;
18    const LINTS: &[&Lint] = &[
19        camera_modification_in_fixed_update::CAMERA_MODIFICATION_IN_FIXED_UPDATE,
20        duplicate_bevy_dependencies::DUPLICATE_BEVY_DEPENDENCIES,
21        zst_query::ZST_QUERY,
22    ];
23
24    fn register_passes(store: &mut LintStore) {
25        store.register_late_pass(|_| {
26            Box::new(camera_modification_in_fixed_update::CameraModificationInFixedUpdate)
27        });
28        // `duplicate_bevy_dependencies` is a Cargo lint, so it does not have its own pass.
29        store.register_late_pass(|_| Box::new(zst_query::ZstQuery));
30    }
31}