-
-
Couldn't load subscription status.
- Fork 4.2k
Description
What problem does this solve or what need does it fill?
A linter could be quite helpful to catch and help correct obvious mistakes in ways the compiler can't, or warn about bad practices in Bevy code.
What solution would you like?
A command line tool is introduced to lint Bevy apps. As some initial ideas, this could catch:
- malformed systems (see Better error messages for IntoSystem and IntoExclusive System #1519)
- unit structs in the first type parameter of Query (these should just use With)
- using
Not<With<T>>orNot<Without<T>>or the like
What alternative(s) have you considered?
Some of this can be implemented either in compiler errors or run-time errors / warnings. The former has serious technical limitations (see #1519), and the latter is noisy and hard to configure.
Clippy doesn't appear to support custom lints, but it would be quite nice to integrate with it if it did.
Additional context
This is not super high priority, but serves as a nice place to track features that we could put in it. This would be part of #436, but should be able to stand alone.