Skip to content

Rollup of 4 pull requests #132902

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

Merged
merged 13 commits into from
Nov 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add test coverage for separate clippy prefixes
Signed-off-by: onur-ozkan <[email protected]>
  • Loading branch information
onur-ozkan committed Nov 10, 2024
commit 469c8baab8670935284b0a38116e993898d7d416
17 changes: 17 additions & 0 deletions src/bootstrap/src/core/config/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,23 @@ fn order_of_clippy_rules() {
assert_eq!(expected, actual);
}

#[test]
fn clippy_rule_separate_prefix() {
let args =
vec!["clippy".to_string(), "-A clippy:all".to_string(), "-W clippy::style".to_string()];
let config = Config::parse(Flags::parse(&args));

let actual = match &config.cmd {
crate::Subcommand::Clippy { allow, deny, warn, forbid, .. } => {
get_clippy_rules_in_order(&args, &allow, &deny, &warn, &forbid)
}
_ => panic!("invalid subcommand"),
};

let expected = vec!["-A clippy:all".to_string(), "-W clippy::style".to_string()];
assert_eq!(expected, actual);
}

#[test]
fn verbose_tests_default_value() {
let config = Config::parse(Flags::parse(&["build".into(), "compiler".into()]));
Expand Down
Loading