TheBevyFlock / bevy_cli

A Bevy CLI tool.
Apache License 2.0
19 stars 4 forks source link

`bevy_lint` should pass `--cfg bevy_lint` when run #117

Open BD103 opened 13 hours ago

BD103 commented 13 hours ago

Related to #88 and #109.

Automatically passing --cfg bevy_lint would let conditional compilation check whether the Bevy Linter is available or not, and would let code do this:

#[cfg_attr(bevy_lint, allow(bevy::my_lint))]

This would help get around #![register_tool(bevy)] being a nightly-only feature, since the cfg would tell the code that nightly is available.

janhohenheim commented 4 hours ago

Good idea! I wonder how that will play along with IDE defaults though.