Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bevy_lint should pass --cfg bevy_lint when run #117

Closed
BD103 opened this issue Sep 28, 2024 · 1 comment · Fixed by #121
Closed

bevy_lint should pass --cfg bevy_lint when run #117

BD103 opened this issue Sep 28, 2024 · 1 comment · Fixed by #121
Labels
A-Linter Related to the linter and custom lints C-Usability An improvement that makes the API more pleasant

Comments

@BD103
Copy link
Member

BD103 commented Sep 28, 2024

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.

@BD103 BD103 added this to the `bevy_lint` 0.1.0 milestone Sep 28, 2024
@BD103 BD103 added A-Linter Related to the linter and custom lints C-Usability An improvement that makes the API more pleasant labels Sep 28, 2024
@janhohenheim
Copy link
Member

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

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants