Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion cli/src/commands/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ pub fn execute(path_str: Option<&str>, fix: bool) -> ExitCode {
}
}

// Fix deprecation warnings
if fix {
let migrated = migrate_source(&content);
if migrated != content {
Expand Down
13 changes: 13 additions & 0 deletions cli/tests/cli_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,16 @@ fn test_cli_emit_commands() {
_ => panic!("Expected EmitLlvm subcommand"),
}
}

#[test]
fn test_cli_lint_options() {
let args = vec!["tech", "lint", "main.txs", "--fix"];
let cli = Cli::try_parse_from(args).expect("args parse successfully");
match cli.command {
Commands::Lint { path, fix } => {
assert_eq!(path.as_deref(), Some("main.txs"));
assert!(fix);
}
_ => panic!("Expected Lint subcommand"),
}
}
Loading