Expand description
bevy_lint is a custom linter for the Bevy game engine, similar to
Clippy.
This is the primary documentation for its lints and lint groups. bevy_lint is not intended to
be consumed as a library. You can find the documentation for individual lints and their groups
in the lints module.
§bevy_lint
bevy_lint is a custom linter for the Bevy game engine, similar to Clippy.
Warning
This is an unofficial community project, hacked upon by the Bevy CLI working group until it is eventually upstreamed into the main Bevy Engine organization. Pardon our rough edges, and please consider submitting an issue if you run into trouble!
§Installation
bevy_lint depends on a pinned nightly version of Rust with the rustc-dev Rustup component. This is because bevy_lint uses internal rustc crates that can only be imported with the permanently-unstable rustc_private feature. You can refer to the compatibility table to see which version of the linter requires which toolchain.
You can install the toolchain required for the latest release with:
rustup toolchain install nightly-2025-06-26 \
--component rustc-dev \
--component llvm-toolsIf you are installing a different version of the linter, you may need to install a different nightly toolchain as specified by the compatibility table. Please be aware that you must keep this toolchain installed for bevy_lint to function1.
Once you have the toolchain installed, you can compile and install bevy_lint through cargo:
rustup run nightly-2025-06-26 cargo install \
--git https://github.com/TheBevyFlock/bevy_cli.git \
--tag lint-v0.4.0 \
--locked \
bevy_lintIf you’re installing a different version of the linter, you may need to switch the toolchain and tag in the above command.
§Getting Started
bevy_lint has the same API as the cargo check command:
bevy_lint --helpIf you have the prototype Bevy CLI installed, the linter is also available through the lint subcommand:
bevy lint --helpFor more information on how to use the website, please see the full documentation.
§License
The Bevy Linter is licensed under either of
- Apache License, Version 2.0 (
LICENSE-APACHEor http://www.apache.org/licenses/LICENSE-2.0) - MIT license (
LICENSE-MITor http://opensource.org/licenses/MIT)
at your option.
§Contributing
Please see CONTRIBUTING.md for the CLI for more information! The linter contributing guide can be found on the website.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
bevy_lintimports internalrustclibraries in order to hook into the compiler process. These crates are stored in a dynamic library that is installed with therustc-devcomponent and loaded bybevy_lintat runtime. Uninstalling the nightly toolchain would remove this dynamic library, causingbevy_lintto fail. ↩
Modules§
- lints
- All lints offered by
bevy_lint, organized by lint group.