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

Bug fixing and chores related to linting #121

Merged
merged 9 commits into from
Oct 2, 2024
Merged

Conversation

BD103
Copy link
Member

@BD103 BD103 commented Sep 29, 2024

This PR tackles a few issues with how bevy_lint functions.

First, it closes #117 by passing --cfg bevy_lint to rustc when bevy_lint is called. This allows code to conditionally configure lints (e.g. #[cfg_attr(bevy_lint, allow(bevy::lint))]).

Secondly, it fixes #118 by specifying the nightly version when calling cargo check. I originally hardcoded this version, but after a comment from @richchurcher I adjusted it to take the version from rust-toolchain.toml. (It specifically uses a build script to parse rust-toolchain.toml using toml_edit, then passes it to the code using an environmental variable.)

Thirdly, I removed other hard-coded references to the specifically nightly channel in README.md and ci.yml. (In CI I specifically used Taplo to parse the version, similar to jq.)

Finally, I added a bit more metadata to Cargo.toml that will be used by https://crates.io once it is published.

@BD103 BD103 added A-Linter Related to the linter and custom lints C-Bug A bug in the program C-Usability An improvement that makes the API more pleasant labels Sep 29, 2024
@BD103
Copy link
Member Author

BD103 commented Sep 29, 2024

CI failure will be fixed by #120, once it is merged.

rust-toolchain.toml Outdated Show resolved Hide resolved
@BD103 BD103 force-pushed the lint-cli-improvements branch from c53b880 to 6a4f3e3 Compare September 30, 2024 17:43
@BD103 BD103 force-pushed the lint-cli-improvements branch from 6a4f3e3 to 4639388 Compare September 30, 2024 17:44
@BD103 BD103 changed the title Specify Rust toolchain version and pass --cfg bevy_lint in bevy_lint Bug fixing and chores related to linting Sep 30, 2024
@BD103 BD103 merged commit f586dd5 into main Oct 2, 2024
7 checks passed
@BD103 BD103 deleted the lint-cli-improvements branch October 2, 2024 12:03
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-Bug A bug in the program C-Usability An improvement that makes the API more pleasant
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bevy_lint should specify toolchain version bevy_lint should pass --cfg bevy_lint when run
2 participants