Skip to content

Mark plugin_not_ending_in_plugin as a renamed lint#391

Merged
DaAlbrecht merged 1 commit intomainfrom
deprecate-plugin-naming-lint
Apr 25, 2025
Merged

Mark plugin_not_ending_in_plugin as a renamed lint#391
DaAlbrecht merged 1 commit intomainfrom
deprecate-plugin-naming-lint

Conversation

@BD103
Copy link
Copy Markdown
Member

@BD103 BD103 commented Apr 24, 2025

LintStore::register_renamed() provides an easy method for migrating from plugin_not_ending_in_plugin to unconventional_naming. If the linter ever runs into code referencing plugin_not_ending_in_plugin:

#![warn(bevy::plugin_not_ending_in_plugin)]

It will now emit a warning that the lint has been renamed, but still correctly configure unconventional_naming:

warning: lint `bevy::plugin_not_ending_in_plugin` has been renamed to `bevy::unconventional_naming`
 --> bevy_lint/examples/lint_example.rs:3:9
  |
3 | #![warn(bevy::plugin_not_ending_in_plugin)]
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `bevy::unconventional_naming`
  |
  = note: `#[warn(renamed_and_removed_lints)]` on by default

Since all of plugin_not_ending_in_plugin was merged into unconventional_naming, this proposes we market it as a rename instead of a complete removal.

…deleting it

This provides easier migration to the new lint.
@BD103 BD103 added A-Linter Related to the linter and custom lints C-Usability An improvement that makes the API more pleasant D-Trivial Nice and easy! A great choice to get started with Bevy CLI S-Needs-Review The PR needs to be reviewed before it can be merged labels Apr 24, 2025
@BD103 BD103 added this to the `bevy_lint` v0.3.0 milestone Apr 24, 2025
@BD103 BD103 mentioned this pull request Apr 24, 2025
3 tasks
Copy link
Copy Markdown
Collaborator

@DaAlbrecht DaAlbrecht left a comment

Choose a reason for hiding this comment

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

This is so neat!

@DaAlbrecht DaAlbrecht merged commit 8e42c60 into main Apr 25, 2025
10 checks passed
@DaAlbrecht DaAlbrecht deleted the deprecate-plugin-naming-lint branch April 25, 2025 08:27
BD103 added a commit that referenced this pull request Apr 30, 2025
This PR prepares `bevy_lint` for v0.3.0, following the [release
guide](https://github.com/TheBevyFlock/bevy_cli/blob/e85154b9bd5851a0dcac3815853ec8194d362fb3/bevy_lint/docs/how-to/release.md).
Once this is marked ready for review, this will need at least one
approval from a Bevy maintainer and no outstanding concerns. Once this
is merged, a feature freeze will be enacted until the [post-release PR
is
merged](https://github.com/TheBevyFlock/bevy_cli/blob/e85154b9bd5851a0dcac3815853ec8194d362fb3/bevy_lint/docs/how-to/release.md#post-release).

## Blockers

- [x] #380
- [x] #389
- [x] #391

## For Reviewers

Now is your chance to look through the
[docs](https://thebevyflock.github.io/bevy_cli/bevy_lint/index.html),
the changelog, and the migration guide to ensure everything is in
working order. If you wish to test the linter, you may install it from
this branch:

```sh
rustup toolchain install nightly-2025-04-03 \
    --component rustc-dev \
    --component llvm-tools-preview

rustup run nightly-2025-04-03 cargo install \
    --git https://github.com/TheBevyFlock/bevy_cli.git \
    --branch linter-v0.3.0 \
    --locked \
    bevy_lint
```

You're encouraged to run the linter on several projects to ensure it
works correctly. Some good places to start include:

- [The Engine](https://github.com/bevyengine/bevy)
- [`bevy_new_2d`](https://github.com/TheBevyFlock/bevy_new_2d)
- [The Official
Template](https://github.com/bevyengine/bevy_github_ci_template)

Thank you for all of your help!

## Next Steps

- Release on Github
- Announce the release on Discord, Mastodon, and other social medias
- Potentially publish an announcement [blog
post](https://bd103.github.io/)
- TheBevyFlock/bevy_new_2d#365

---------

Co-authored-by: DAA <42379074+DaAlbrecht@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Linter Related to the linter and custom lints C-Usability An improvement that makes the API more pleasant D-Trivial Nice and easy! A great choice to get started with Bevy CLI S-Needs-Review The PR needs to be reviewed before it can be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants