-
Notifications
You must be signed in to change notification settings - Fork 1.6k
configuration option to lint incompatible_msrv
in test code
#14279
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
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @blyxyas (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
cb0c689
to
6aebfc1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add some tests? We test with different clippy.toml
s at tests/ui-toml
. You can add a new incompatible-msrv
directory if it doesn't exist already, With a check-incompatible-msrv-in-tests = true
in that tests/ui-toml/incompatible-msrv/clippy.toml
and the following test flag for ui-toml/../<test filename>
:
//@compile-flags --test
You can check the files in tests/ui-toml
to gather some inspiration :)
6aebfc1
to
325bfef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! ❤️
//@compile-flags: --test | ||
//@revisions: default enabled | ||
//@[enabled] rustc-env:CLIPPY_CONF_DIR=tests/ui-toml/check_incompatible_msrv_in_tests/enabled | ||
//@[default] rustc-env:CLIPPY_CONF_DIR=tests/ui-toml/check_incompatible_msrv_in_tests/default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really smart to use several revisions instead of multiple subdirectories!
fixes #14277
changelog: [
incompatible_msrv
]: add config option [check-incompatible-msrv-in-tests
] to enable in#[test]
and#[cfg(test)]
code.