-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
A-LinterRelated to the linter and custom lintsRelated to the linter and custom lintsC-BugA bug in the programA bug in the programD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixesA "normal" level of difficulty; suitable for simple features or challenging fixes
Milestone
Description
There are lots of ways to add a system to a schedule, but camera_modification_in_fixed_update doesn't catch most of them. We currently do this:
bevy_cli/bevy_lint/src/lints/nursery/camera_modification_in_fixed_update.rs
Lines 108 to 110 in 71a2ac4
| // Match calls to `App::add_systems(schedule, systems)` | |
| if !crate::paths::APP.matches_ty(cx, receiver_ty) | |
| || method_path.ident.name != sym::add_systems |
But that only catches App::add_systems(...). These are all the systems I could find that can potentially add a system to FixedUpdate:
App|SubAppadd_systemsconfigure_setsget_schedule_mut->Schedule
Schedulesadd_systemsconfigure_setsentry->Scheduleget_mut->Schedule
Schedule(that's guaranteed to beFixedUpdate, returned from another method)add_systemsconfigure_setsgraph_mut(manually adding the system node to the graph, too complicated to check IMO)
Worldschedule_scopetry_schedule_scope
I don't think we need to check for all of these (some like Schedule::graph_mut() are particularly obtuse), but there is some low-hanging fruit like SubApp::add_systems()!
Metadata
Metadata
Assignees
Labels
A-LinterRelated to the linter and custom lintsRelated to the linter and custom lintsC-BugA bug in the programA bug in the programD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixesA "normal" level of difficulty; suitable for simple features or challenging fixes