diff --git a/cli/src/commands/lint.rs b/cli/src/commands/lint.rs index 773ba2da..c7b38232 100644 --- a/cli/src/commands/lint.rs +++ b/cli/src/commands/lint.rs @@ -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 { diff --git a/cli/tests/cli_tests.rs b/cli/tests/cli_tests.rs index 7dc47930..0e11db73 100644 --- a/cli/tests/cli_tests.rs +++ b/cli/tests/cli_tests.rs @@ -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"), + } +}