Skip to content

Commit

Permalink
docs: better documentation for stdin-file-path (#515)
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico authored Oct 12, 2023
1 parent 68c5ac3 commit f721432
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions crates/biome_cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ pub enum BiomeCommand {
configuration: Option<Configuration>,
#[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<String>,
/// Single file, single path or list of paths
Expand All @@ -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<String>,
/// Single file, single path or list of paths
Expand All @@ -134,10 +137,11 @@ pub enum BiomeCommand {

#[bpaf(external, optional, hide_usage)]
files_configuration: Option<FilesConfiguration>,

/// 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<String>,

Expand Down

0 comments on commit f721432

Please sign in to comment.