TheBevyFlock / bevy_cli

A Bevy CLI tool and linter.
https://thebevyflock.github.io/bevy_cli/
Apache License 2.0
52 stars 7 forks source link

Several lints do not check against alternative method syntax #94

Open BD103 opened 2 months ago

BD103 commented 2 months 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 1 month ago

This also occurs in panicking_query_methods and panicking_world_methods.

In total, the following lints are affected: