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

Verify clippy_utils and rust-toolchain.toml match nightly versions #187

Open
BD103 opened this issue Nov 29, 2024 · 0 comments
Open

Verify clippy_utils and rust-toolchain.toml match nightly versions #187

BD103 opened this issue Nov 29, 2024 · 0 comments
Labels
A-CI Related to CI and GitHub Actions A-Linter Related to the linter and custom lints C-Code-Quality An improvement of readability or quality

Comments

@BD103
Copy link
Member

BD103 commented Nov 29, 2024

Maybe write a script, that checks that this version, the one in the README and the clippy_utils version match. Should be possible with some cargo metadata magic and pulling from crates.io. Something like this:

VERSION=$(cargo metadata --format-version 1 | jq '.packages[] | select(.name == "clippy_utils")' | jq -r '.version')
EXP_NIGHTLY=$(wget -qO- https://crates.io/api/v1/crates/clippy_utils/${VERSION}/readme | grep -Po "nightly-\d\d\d\d-\d\d-\d\d")

RTC_NIGHTLY=$(grep -Po "nightly-\d\d\d\d-\d\d-\d\d" rust-toolchain.toml)
RM_NIGHTLY=$(grep -Po "nightly-\d\d\d\d-\d\d-\d\d" bevy_lint/README.md | head -1)

test $EXP_NIGHTLY = $RTC_NIGHTLY
test $EXP_NIGHTLY = $RM_NIGHTLY

The RM_NIGHTLY command needs to be adjusted, as there are other nightly mentions in the file. The rest should work with maybe some minor adjustments.

Originally posted by @flip1995 in #186 (comment)

@BD103 BD103 added A-CI Related to CI and GitHub Actions A-Linter Related to the linter and custom lints C-Code-Quality An improvement of readability or quality labels Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI Related to CI and GitHub Actions A-Linter Related to the linter and custom lints C-Code-Quality An improvement of readability or quality
Projects
None yet
Development

No branches or pull requests

1 participant