Skip to content

Commit

Permalink
handle uppercase false
Browse files Browse the repository at this point in the history
  • Loading branch information
bbstilson authored and nrempel committed Feb 24, 2024
1 parent f6f0195 commit aa29cb8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn main() {
let options = Options::parse();
let format_options = FormatOptions {
indent: Indent::Spaces(options.indent_spaces),
uppercase: options.uppercase,
uppercase: options.uppercase.unwrap_or(true),
lines_between_queries: options.lines_between_queries,
};

Expand Down Expand Up @@ -99,13 +99,12 @@ struct Options {
#[clap(short, long, default_value = "4")]
indent_spaces: u8,
/// Change reserved keywords to ALL CAPS
#[clap(short = 'U', long, default_value = "true")]
uppercase: bool,
#[clap(short = 'U', long)]
uppercase: Option<bool>,
/// Set the number of line breaks after a query
#[clap(short, long, default_value = "2")]
lines_between_queries: u8,
/// Enforce a tailing newline at the end of the file
#[clap(short = 'n', long, default_value = "false")]
trailing_newline: bool,
}

0 comments on commit aa29cb8

Please sign in to comment.