@@ -18,7 +18,7 @@ use ruff_linter::settings::types::SerializationFormat;
1818use ruff_linter:: { fs, warn_user, warn_user_once} ;
1919use ruff_workspace:: Settings ;
2020
21- use crate :: args:: { Args , CheckCommand , Command , FormatCommand , HelpFormat } ;
21+ use crate :: args:: { Args , CheckCommand , Command , FormatCommand } ;
2222use crate :: printer:: { Flags as PrinterFlags , Printer } ;
2323
2424pub mod args;
@@ -114,15 +114,6 @@ fn resolve_default_files(files: Vec<PathBuf>, is_stdin: bool) -> Vec<PathBuf> {
114114 }
115115}
116116
117- /// Get the actual value of the `format` desired from either `output_format`
118- /// or `format`, and warn the user if they're using the deprecated form.
119- fn resolve_help_output_format ( output_format : HelpFormat , format : Option < HelpFormat > ) -> HelpFormat {
120- if format. is_some ( ) {
121- warn_user ! ( "The `--format` argument is deprecated. Use `--output-format` instead." ) ;
122- }
123- format. unwrap_or ( output_format)
124- }
125-
126117pub fn run (
127118 Args {
128119 command,
@@ -171,10 +162,8 @@ pub fn run(
171162 Command :: Rule {
172163 rule,
173164 all,
174- format,
175- mut output_format,
165+ output_format,
176166 } => {
177- output_format = resolve_help_output_format ( output_format, format) ;
178167 if all {
179168 commands:: rule:: rules ( output_format) ?;
180169 }
@@ -187,11 +176,7 @@ pub fn run(
187176 commands:: config:: config ( option. as_deref ( ) ) ?;
188177 Ok ( ExitStatus :: Success )
189178 }
190- Command :: Linter {
191- format,
192- mut output_format,
193- } => {
194- output_format = resolve_help_output_format ( output_format, format) ;
179+ Command :: Linter { output_format } => {
195180 commands:: linter:: linter ( output_format) ?;
196181 Ok ( ExitStatus :: Success )
197182 }
0 commit comments