Conversation
|
Tested on MacOS with the following config [workspace.metadata.bevy_lint]
# on by default
correctness = "warn"
suspicious = "warn"
complexity = "warn"
performance = "warn"
# off by default
style = "warn"
restriction = "warn"
pedantic = "warn"On these Repositories:
Worked as expected with no Just out of fun, the Lint output from: [workspace.metadata.bevy_lint]
#enabled by default
correctness = "warn"
suspicious = "warn"
complexity = "warn"
performance = "warn"
# off by default
style = "warn"
panicking_methods = { level = "warn" }
pedantic = "warn" |
Updated our dev dependencies, most importantly changed from the rc.2 to "0.16.0" from bevy
alice-i-cecile
left a comment
There was a problem hiding this comment.
unconventional_naming needs work. These should be split into distinct lints, so users can pick and choose more easily. The system set convention should also be changed, to match the style picked by @Jondolf for Bevy itself :)
The rest of this looks fine, although main_return_without_appexit confuses me a bit: why should this lint exist, rather than just being a must_use annotation upstream?
We have planned to support configuring the [package.metadata.bevy_lint]
unconventional_naming = { level = "warn", traits = ["SystemSet", "Plugin"] }And for the system set convention, we switched to using
I don't know the history, but I think that there were some attempts to do this: bevyengine/bevy#5395, bevyengine/bevy#11947, but that in the end it didn't work, so it sparked the idea for this lint? |
Yup! #384 was merged to fix this, but #387 merged at the same time and caused the docs to become outdated. I'll handle that in this PR.
Exactly: a lint is configurable, Footnotes
|
I take this back, the docs and the implementation look correct. Is there something I'm missing? We decided on |
|
Note that the "Test linter action" workflows are meant to fail, as the |
I ended up looking at the linked PR, so I didn't see any corrections :) |
alice-i-cecile
left a comment
There was a problem hiding this comment.
Making the must_use configurable makes sense to me as a justification. And using config to split apart the lint seems like a great solution. That can wait; this LGTM now.
|
Awesome, thank you so much! I'll merge this later today, once I have time to manage the release :) |
This PR prepares
bevy_lintfor v0.3.0, following the release guide. 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.Blockers
missing_reflectcheck if all fields implementReflectotherwiseApplicability ::MaybeIncorrect#389plugin_not_ending_in_pluginas a renamed lint #391For Reviewers
Now is your chance to look through the docs, 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:
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_lintYou're encouraged to run the linter on several projects to ensure it works correctly. Some good places to start include:
bevy_new_2dThank you for all of your help!
Next Steps
bevy_lintsupport bevy_new_2d#365