pub struct FormatCommand {
pub files: Vec<PathBuf>,
pub check: bool,
pub diff: bool,
pub no_cache: bool,
pub stdin_filename: Option<PathBuf>,
pub file_selection: FileSelectionArgs,
pub dialect: Option<FormatDialectArg>,
pub indent_style: Option<FormatIndentStyleArg>,
pub indent_width: Option<u8>,
pub simplify: bool,
pub minify: bool,
/* private fields */
}Expand description
Arguments for shuck format.
Fields§
§files: Vec<PathBuf>List of files or directories to format, or - to read from stdin.
check: boolAvoid writing any formatted files back; instead, exit non-zero if any files would change.
diff: boolAvoid writing any formatted files back; instead, print a diff for each changed file.
no_cache: boolDisable cache reads and writes.
stdin_filename: Option<PathBuf>The name of the file when reading the source from stdin.
file_selection: FileSelectionArgsFile discovery and exclusion settings.
dialect: Option<FormatDialectArg>Override the auto-discovered shell dialect used for parsing and formatting.
indent_style: Option<FormatIndentStyleArg>Choose the indentation style.
indent_width: Option<u8>Set the indentation width for space indentation.
simplify: boolApply safe simplifications before formatting.
minify: boolEmit a compact minified form and drop comments.
Implementations§
Source§impl FormatCommand
impl FormatCommand
Sourcepub fn binary_next_line(&self) -> Option<bool>
pub fn binary_next_line(&self) -> Option<bool>
Resolve the effective binary-next-line formatter option.
Sourcepub fn switch_case_indent(&self) -> Option<bool>
pub fn switch_case_indent(&self) -> Option<bool>
Resolve the effective switch-case-indent formatter option.
Sourcepub fn space_redirects(&self) -> Option<bool>
pub fn space_redirects(&self) -> Option<bool>
Resolve the effective space-redirects formatter option.
Sourcepub fn keep_padding(&self) -> Option<bool>
pub fn keep_padding(&self) -> Option<bool>
Resolve the effective keep-padding formatter option.
Sourcepub fn function_next_line(&self) -> Option<bool>
pub fn function_next_line(&self) -> Option<bool>
Resolve the effective function-next-line formatter option.
Sourcepub fn never_split(&self) -> Option<bool>
pub fn never_split(&self) -> Option<bool>
Resolve the effective never-split formatter option.
Sourcepub fn respect_gitignore(&self) -> bool
pub fn respect_gitignore(&self) -> bool
Whether standard ignore files such as .gitignore should be respected.
Sourcepub fn force_exclude(&self) -> bool
pub fn force_exclude(&self) -> bool
Whether excludes should also apply to explicitly passed paths.
Trait Implementations§
Source§impl Args for FormatCommand
impl Args for FormatCommand
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl Clone for FormatCommand
impl Clone for FormatCommand
Source§fn clone(&self) -> FormatCommand
fn clone(&self) -> FormatCommand
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FormatCommand
impl Debug for FormatCommand
Source§impl FromArgMatches for FormatCommand
impl FromArgMatches for FormatCommand
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Auto Trait Implementations§
impl Freeze for FormatCommand
impl RefUnwindSafe for FormatCommand
impl Send for FormatCommand
impl Sync for FormatCommand
impl Unpin for FormatCommand
impl UnsafeUnpin for FormatCommand
impl UnwindSafe for FormatCommand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more