TheBevyFlock / bevy_cli

A Bevy CLI tool.
Apache License 2.0
31 stars 5 forks source link

Several lints do not check against alternative method syntax #94

Open BD103 opened 1 month ago

BD103 commented 1 month ago

The following code does not raise any warnings:

#[derive(Event)]
struct MyEvent;

fn main() {
    let mut app = App::new();
    App::init_resource::<Events<MyEvent>>(&mut app);
    App::run(&mut app);
}

This is likely because both lints match against just ExprKind::MethodCall, when they should also be looking for normal function calls.

Not sure if this bug will come up often, so this is probably low-priority.

BD103 commented 3 weeks ago

This also occurs in panicking_query_methods and panicking_world_methods.

In total, the following lints are affected: