From f7214328faac7d031ce233def2deea80533d8c8e Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Thu, 12 Oct 2023 09:25:16 +0100 Subject: [PATCH] docs: better documentation for `stdin-file-path` (#515) --- crates/biome_cli/src/commands/mod.rs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/crates/biome_cli/src/commands/mod.rs b/crates/biome_cli/src/commands/mod.rs index bdde8d096ce8..18faf0b9868a 100644 --- a/crates/biome_cli/src/commands/mod.rs +++ b/crates/biome_cli/src/commands/mod.rs @@ -78,9 +78,11 @@ pub enum BiomeCommand { configuration: Option, #[bpaf(external, hide_usage)] cli_options: CliOptions, - /// A file name with its extension to pass when reading from standard in, e.g. echo 'let a;' | biome check --stdin-file-path=file.js" + /// Use this option when you want to format code piped from `stdin`, and print the output to `stdout`. /// - /// The file doesn't need to exist on disk, what matters is the extension of the file. Based on the extension, Biome will use the appropriate tool. + /// The file doesn't need to exist on disk, what matters is the extension of the file. Based on the extension, Biome knows how to check the code. + /// + /// Example: `echo 'let a;' | biome check --stdin-file-path=file.js` #[bpaf(long("stdin-file-path"), argument("PATH"), hide_usage)] stdin_file_path: Option, /// Single file, single path or list of paths @@ -107,10 +109,11 @@ pub enum BiomeCommand { #[bpaf(external, hide_usage)] cli_options: CliOptions, - - /// A file name with its extension to pass when reading from standard in, e.g. echo 'let a;' | biome lint --stdin-file-path=file.js" + /// Use this option when you want to format code piped from `stdin`, and print the output to `stdout`. + /// + /// The file doesn't need to exist on disk, what matters is the extension of the file. Based on the extension, Biome knows how to lint the code. /// - /// The file doesn't need to exist on disk, what matters is the extension of the file. Based on the extension, Biome will use the appropriate tool. + /// Example: `echo 'let a;' | biome lint --stdin-file-path=file.js` #[bpaf(long("stdin-file-path"), argument("PATH"), hide_usage)] stdin_file_path: Option, /// Single file, single path or list of paths @@ -134,10 +137,11 @@ pub enum BiomeCommand { #[bpaf(external, optional, hide_usage)] files_configuration: Option, - - /// A file name with its extension to pass when reading from standard in, e.g. echo 'let a;' | biome format --stdin-file-path=file.js". + /// Use this option when you want to format code piped from `stdin`, and print the output to `stdout`. + /// + /// The file doesn't need to exist on disk, what matters is the extension of the file. Based on the extension, Biome knows how to format the code. /// - /// The file doesn't need to exist on disk, what matters is the extension of the file. Based on the extension, Biome will use the appropriate tool. + /// Example: `echo 'let a;' | biome format --stdin-file-path=file.js` #[bpaf(long("stdin-file-path"), argument("PATH"), hide_usage)] stdin_file_path: Option,