Module unconventional_naming

Source
Expand description

Checks for types that implement certain Bevy traits but do not follow that trait’s naming convention.

This lint currently enforces the following conventions:

TraitConvention
PluginName ends in “Plugin”
SystemSetName ends in “Systems”

§Motivation

Bevy provides several traits, such as Plugin and SystemSet, that designate the primary purpose of a type. It is common for these types to follow certain naming conventions that signal how it should be used. This lint helps enforce these conventions to ensure consistency across the Bevy engine and ecosystem.

§Example

struct Physics;

impl Plugin for Physics {
    // ...
}

#[derive(SystemSet, Debug, Clone, PartialEq, Eq, Hash)]
struct MyAudio;

Use instead:

struct PhysicsPlugin;

impl Plugin for PhysicsPlugin {
    // ...
}

#[derive(SystemSet, Debug, Clone, PartialEq, Eq, Hash)]
struct MyAudioSystems;

Structs§

UnconventionalNaming

Statics§

UNCONVENTIONAL_NAMING