mirror of
				https://github.com/astral-sh/ruff.git
				synced 2025-10-31 12:05:57 +00:00 
			
		
		
		
	[ty] Allow -q short alias for --quiet (#19364)
				
					
				
			This commit is contained in:
		
							parent
							
								
									560ae04346
								
							
						
					
					
						commit
						0c84652cc5
					
				
					 3 changed files with 22 additions and 1 deletions
				
			
		
							
								
								
									
										2
									
								
								crates/ty/docs/cli.md
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								crates/ty/docs/cli.md
									
										
									
										generated
									
									
									
								
							|  | @ -84,7 +84,7 @@ over all configuration files.</p> | ||||||
| <li><code>3.11</code></li> | <li><code>3.11</code></li> | ||||||
| <li><code>3.12</code></li> | <li><code>3.12</code></li> | ||||||
| <li><code>3.13</code></li> | <li><code>3.13</code></li> | ||||||
| </ul></dd><dt id="ty-check--quiet"><a href="#ty-check--quiet"><code>--quiet</code></a></dt><dd><p>Use quiet output</p> | </ul></dd><dt id="ty-check--quiet"><a href="#ty-check--quiet"><code>--quiet</code></a>, <code>-q</code></dt><dd><p>Use quiet output</p> | ||||||
| </dd><dt id="ty-check--respect-ignore-files"><a href="#ty-check--respect-ignore-files"><code>--respect-ignore-files</code></a></dt><dd><p>Respect file exclusions via <code>.gitignore</code> and other standard ignore files. Use <code>--no-respect-gitignore</code> to disable</p> | </dd><dt id="ty-check--respect-ignore-files"><a href="#ty-check--respect-ignore-files"><code>--respect-ignore-files</code></a></dt><dd><p>Respect file exclusions via <code>.gitignore</code> and other standard ignore files. Use <code>--no-respect-gitignore</code> to disable</p> | ||||||
| </dd><dt id="ty-check--typeshed"><a href="#ty-check--typeshed"><code>--typeshed</code></a>, <code>--custom-typeshed-dir</code> <i>path</i></dt><dd><p>Custom directory to use for stdlib typeshed stubs</p> | </dd><dt id="ty-check--typeshed"><a href="#ty-check--typeshed"><code>--typeshed</code></a>, <code>--custom-typeshed-dir</code> <i>path</i></dt><dd><p>Custom directory to use for stdlib typeshed stubs</p> | ||||||
| </dd><dt id="ty-check--verbose"><a href="#ty-check--verbose"><code>--verbose</code></a>, <code>-v</code></dt><dd><p>Use verbose output (or <code>-vv</code> and <code>-vvv</code> for more verbose output)</p> | </dd><dt id="ty-check--verbose"><a href="#ty-check--verbose"><code>--verbose</code></a>, <code>-v</code></dt><dd><p>Use verbose output (or <code>-vv</code> and <code>-vvv</code> for more verbose output)</p> | ||||||
|  |  | ||||||
|  | @ -30,6 +30,7 @@ pub(crate) struct Verbosity { | ||||||
| 
 | 
 | ||||||
|     #[arg(
 |     #[arg(
 | ||||||
|         long, |         long, | ||||||
|  |         short, | ||||||
|         help = "Use quiet output", |         help = "Use quiet output", | ||||||
|         action = clap::ArgAction::Count, |         action = clap::ArgAction::Count, | ||||||
|         global = true, |         global = true, | ||||||
|  |  | ||||||
|  | @ -69,6 +69,26 @@ fn test_quiet_output() -> anyhow::Result<()> { | ||||||
|     ----- stderr ----- |     ----- stderr ----- | ||||||
|     ");
 |     ");
 | ||||||
| 
 | 
 | ||||||
|  |     // We allow `-q`
 | ||||||
|  |     assert_cmd_snapshot!(case.command().arg("-q"), @r" | ||||||
|  |     success: false | ||||||
|  |     exit_code: 1 | ||||||
|  |     ----- stdout ----- | ||||||
|  |     Found 1 diagnostic | ||||||
|  | 
 | ||||||
|  |     ----- stderr ----- | ||||||
|  |     ");
 | ||||||
|  | 
 | ||||||
|  |     // And repeated `-qq`
 | ||||||
|  |     assert_cmd_snapshot!(case.command().arg("-qq"), @r" | ||||||
|  |     success: false | ||||||
|  |     exit_code: 1 | ||||||
|  |     ----- stdout ----- | ||||||
|  |     Found 1 diagnostic | ||||||
|  | 
 | ||||||
|  |     ----- stderr ----- | ||||||
|  |     ");
 | ||||||
|  | 
 | ||||||
|     Ok(()) |     Ok(()) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Zanie Blue
						Zanie Blue