Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
559 changes: 284 additions & 275 deletions Cargo.lock

Large diffs are not rendered by default.

22 changes: 20 additions & 2 deletions bevy_lint/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,33 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic
[Keep a Changelog]: https://keepachangelog.com/en/1.1.0/
[Semantic Versioning]: https://semver.org/spec/v2.0.0.html

## Unreleased
## v0.5.0 - TODO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note so we don't forget to update the date (this has happened too much in the past 😅)


**All Changes**: [`lint-v0.4.0...main`](https://github.com/TheBevyFlock/bevy_cli/compare/lint-v0.4.0...main)
**All Changes**: [`lint-v0.4.0...lint-v0.5.0`](https://github.com/TheBevyFlock/bevy_cli/compare/lint-v0.4.0...lint-v0.5.0)

### Changed

- The linter now supports Bevy 0.17, but no longer supports Bevy 0.16 ([#577](https://github.com/TheBevyFlock/bevy_cli/pull/577))
- `insert_event_resource` lint got renamed to `insert_message_resource`.
- `iter_current_update_events` lint got renamed to `iter_current_update_messages`.
- Bumped nightly toolchain to `nightly-2025-12-11` ([#697](https://github.com/TheBevyFlock/bevy_cli/pull/697))

### Added

- Improve linter's diagnostics when it ICEs ([#517](https://github.com/TheBevyFlock/bevy_cli/pull/517))
- The Bevy CLI (Alpha) can now lint web Bevy apps ([#523](https://github.com/TheBevyFlock/bevy_cli/pull/523))
- The Bevy CLI (Alpha) can now install any `bevy_lint` version ([#529](https://github.com/TheBevyFlock/bevy_cli/pull/529))
- Added lint `missing_trait_for_unit_struct` to `restriction` ([#574](https://github.com/TheBevyFlock/bevy_cli/pull/574))
- This checks for unit structs that do not implement `Copy`,`Clone` or `Default`.

### Fixed

- The `unit_in_bundle` lint no longer ICE's on projection types ([#659](https://github.com/TheBevyFlock/bevy_cli/pull/659))

### Removed

- Deprecated lint `insert_unit_bundle` was removed ([#724](https://github.com/TheBevyFlock/bevy_cli/pull/724))


## v0.4.0 - 2025-08-06

Expand Down
2 changes: 1 addition & 1 deletion bevy_lint/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_lint"
version = "0.5.0-dev"
version = "0.5.0"
authors = ["BD103"]
edition = "2024"
description = "A collection of lints for the Bevy game engine"
Expand Down
14 changes: 13 additions & 1 deletion bevy_lint/MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ To actually install the new version of the linter, please see [the docs] and [th
[the releases page]: https://github.com/TheBevyFlock/bevy_cli/releases
[submit an issue]: https://github.com/TheBevyFlock/bevy_cli/issues

## v0.4.0 to v0.5.0 (Unreleased)
## v0.4.0 to v0.5.0

### [Bevy 0.17 Support](https://github.com/TheBevyFlock/bevy_cli/pull/577)

Expand All @@ -30,6 +30,18 @@ In Bevy 0.17, Event is now exclusively the name/trait for the concept of somethi
[MessageWriter]: https://docs.rs/bevy/0.17.3/bevy/ecs/message/struct.MessageWriter.html
[MessageReader]: https://docs.rs/bevy/0.17.3/bevy/ecs/message/struct.MessageReader.html

### [Bumped Nightly Toolchain to `nightly-2025-12-11`](https://github.com/TheBevyFlock/bevy_cli/pull/697)

`bevy_lint` now requires the `nightly-2025-12-11` toolchain, which supports Rust 1.94.0. You may uninstall the old `nightly-2025-06-26` toolchain and install the new toolchain using Rustup:

```sh
rustup toolchain uninstall nightly-2025-06-26

rustup toolchain install nightly-2025-12-11 \
--component rustc-dev \
--component llvm-tools
```

## v0.3.0 to v0.4.0

### [Bumped Nightly Toolchain to `nightly-2025-06-26`](https://github.com/TheBevyFlock/bevy_cli/pull/507)
Expand Down
6 changes: 3 additions & 3 deletions bevy_lint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ see <https://linebender.org/blog/doc-include/>.
You can install the toolchain required for the latest release with:

```sh
rustup toolchain install nightly-2025-06-26 \
rustup toolchain install nightly-2025-12-11 \
--component rustc-dev \
--component llvm-tools
```
Expand All @@ -44,9 +44,9 @@ If you are installing a different version of the linter, you may need to install
Once you have the toolchain installed, you can compile and install `bevy_lint` through `cargo`:

```sh
rustup run nightly-2025-06-26 cargo install \
rustup run nightly-2025-12-11 cargo install \
--git https://github.com/TheBevyFlock/bevy_cli.git \
--tag lint-v0.4.0 \
--tag lint-v0.5.0 \
--locked \
bevy_lint
```
Expand Down
3 changes: 0 additions & 3 deletions bevy_lint/src/lints/suspicious/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,5 @@ impl LintGroup for Suspicious {

fn register_lints(store: &mut LintStore) {
store.register_lints(Self::LINTS);

// This helps users migrate to v0.4.0, but should be removed before v0.5.0 is released.
store.register_renamed("bevy::insert_unit_bundle", "bevy::unit_in_bundle");
}
}
2 changes: 1 addition & 1 deletion docs/src/contribute/linter/how-to/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
2. Replace `Unreleased` heading with the version with the format `vX.Y.Z - YYYY-MM-DD`.
3. Update the `**All Changes**` link to compare from `main` to the new tag `lint-vX.Y.Z`. (E.g. `lint-v0.1.0...main` to `lint-v0.1.0...lint-v0.2.0`.)
4. Review the migration guide (`bevy_lint/MIGRATION.md`) and ensure all breaking / significant changes from the previous version are documented.
5. Remove the `-dev` suffix from the version in `Cargo.toml` and the compatibility table in `bevy_lint/README.md`.
5. Remove the `-dev` suffix from the version in `Cargo.toml` and the compatibility table in `bevy_cli/docs/src/linter/compatibility.md`.
- Please ensure that `Cargo.lock` also updates!
6. Use `grep` to replace most instances of the previous linter version and toolchain with the new ones in the `docs` folder and `README.md`.
- Be careful not to change the wrong portions of the changelog, migration guide, and compatibility table.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/linter/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

|`bevy_lint` Version|Rust Version|Rustup Toolchain|Bevy Version|
|-|-|-|-|
|0.5.0-dev|1.94.0|`nightly-2025-12-11`|0.17|
|0.5.0|1.94.0|`nightly-2025-12-11`|0.17|
|0.4.0|1.90.0|`nightly-2025-06-26`|0.16|
|0.3.0|1.88.0|`nightly-2025-04-03`|0.16|
|0.2.0|1.87.0|`nightly-2025-02-20`|0.15|
Expand Down
10 changes: 5 additions & 5 deletions docs/src/linter/github-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

## Latest Release

The following steps will install v0.4.0 of the linter and run it for all crates in a workspace:
The following steps will install v0.5.0 of the linter and run it for all crates in a workspace:

```yml
- name: Install `bevy_lint`
uses: TheBevyFlock/bevy_cli/bevy_lint@lint-v0.4.0
uses: TheBevyFlock/bevy_cli/bevy_lint@lint-v0.5.0

- name: Run `bevy_lint`
run: bevy_lint --workspace
Expand All @@ -27,7 +27,7 @@ Note that this action overrides the default toolchain and configures it to be th

# Overrides the default toolchain to be nightly Rust.
- name: Install `bevy_lint`
uses: TheBevyFlock/bevy_cli/bevy_lint@lint-v0.4.0
uses: TheBevyFlock/bevy_cli/bevy_lint@lint-v0.5.0

# Resets the default toolchain back to stable Rust.
- name: Configure the default Rust toolchain
Expand Down Expand Up @@ -60,7 +60,7 @@ By default, using the provided action will cause the linter to be recompiled for

```yml
- name: Install `bevy_lint`
uses: TheBevyFlock/bevy_cli/bevy_lint@lint-v0.4.0
uses: TheBevyFlock/bevy_cli/bevy_lint@lint-v0.5.0
with:
cache: true
```
Expand All @@ -69,7 +69,7 @@ You can also configure whether a new cache can be saved with the `save-cache-if`

```yml
- name: Install `bevy_lint`
uses: TheBevyFlock/bevy_cli/bevy_lint@lint-v0.4.0
uses: TheBevyFlock/bevy_cli/bevy_lint@lint-v0.5.0
with:
cache: true
save-cache-if: ${{ github.ref == 'refs/heads/main' }}
Expand Down
14 changes: 7 additions & 7 deletions docs/src/linter/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@

## CLI

The CLI supports automatically installing the linter. Make sure you [have the CLI first](../cli/install.md), then simply run `bevy lint install v0.4.0`.
The CLI supports automatically installing the linter. Make sure you [have the CLI first](../cli/install.md), then simply run `bevy lint install v0.5.0`.

The CLI will prompt you if you wish to install the linter and the required toolchain. Note that it will assume you are using Rustup, and if that isn't the case you should [install the linter manually instead](#manual-without-rustup).

```
Do you want to install `bevy_lint-v0.4.0` and the required toolchain: `nightly-2025-06-26` ? [y/n]
Do you want to install `bevy_lint-v0.5.0` and the required toolchain: `nightly-2025-12-11` ? [y/n]
```

If you want to auto-confirm the prompt, you may pass `--yes` to the command. Note that if you are installing the linter in CI, you may wish to use the [dedicated Github Action instead](github-actions.md):

```sh
bevy lint install --yes v0.4.0
bevy lint install --yes v0.5.0
```

## Manual with Rustup

`bevy_lint` requires a specific nightly Rust toolchain with the `rustc-dev` and `llvm-tools` components. You can install the toolchain required for the latest release with:

```sh
rustup toolchain install nightly-2025-06-26 \
rustup toolchain install nightly-2025-12-11 \
--component rustc-dev \
--component llvm-tools
```
Expand All @@ -33,9 +33,9 @@ If you are installing a different version of the linter, you may need to install
Once you have the toolchain installed, you can compile and install `bevy_lint` through Cargo:

```sh
rustup run nightly-2025-06-26 cargo install \
rustup run nightly-2025-12-11 cargo install \
--git https://github.com/TheBevyFlock/bevy_cli.git \
--tag lint-v0.4.0 \
--tag lint-v0.5.0 \
--locked \
bevy_lint
```
Expand All @@ -51,7 +51,7 @@ Once you've installed the toolchain and components, use that toolchain's `cargo`
```sh
my-toolchain/bin/cargo install \
--git https://github.com/TheBevyFlock/bevy_cli.git \
--tag lint-v0.4.0 \
--tag lint-v0.5.0 \
--locked \
bevy_lint
```
Expand Down
8 changes: 4 additions & 4 deletions docs/src/linter/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ If you have [`cranelift`](https://github.com/rust-lang/rustc_codegen_cranelift)

```
error: failed to find a `codegen-backends` folder in the sysroot candidates:
* ~/.rustup/toolchains/nightly-2025-06-26-x86_64-unknown-linux-gnu
* ~/.rustup/toolchains/nightly-2025-06-26-x86_64-unknown-linux-gnu
* ~/.rustup/toolchains/nightly-2025-12-11-unknown-linux-gnu
* ~/.rustup/toolchains/nightly-2025-12-11-x86_64-unknown-linux-gnu
```

This error occurs because you do not have `cranelift` installed for the specific nightly toolchain that the linter uses. You can fix this by installing `rustc-codegen-cranelift-preview` for the linter's toolchain:

```sh
rustup component add rustc-codegen-cranelift-preview --toolchain nightly-2025-06-26
rustup component add rustc-codegen-cranelift-preview --toolchain nightly-2025-12-11
```

## Using with `sccache`
Expand All @@ -33,7 +33,7 @@ Error: command `~/.cargo/bin/bevy_lint ` exited with status code exit status: 10
You can fix the error by setting [the `CARGO` environmental variable](https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-crates) when running the linter. This informs `sccache` that `bevy_lint` uses Cargo:

```sh
CARGO=$(rustup which --toolchain nightly-2025-06-26 cargo) bevy_lint
CARGO=$(rustup which --toolchain nightly-2025-12-11 cargo) bevy_lint
```

If you [use `BEVY_LINT_SYSROOT` instead of Rustup](environmental-variables.md), you can run this instead:
Expand Down