pub struct FormatConfig {
pub indent: Indent,
pub max_line_length: MaxLineLength,
pub sort_imports: bool,
pub sort_inputs: bool,
pub trailing_commas: bool,
pub reorder_sections: bool,
pub upgrade_deprecations: bool,
pub newline_style: NewlineStyle,
pub quote_style: QuoteStyle,
}Expand description
Configuration for formatting.
Fields§
§indent: IndentThe indentation configuration.
max_line_length: MaxLineLengthThe maximum line length.
sort_imports: boolWhether to sort import statements alphabetically.
sort_inputs: boolWhether to sort input sections.
trailing_commas: boolWhether to add trailing commas to multiline lists.
reorder_sections: boolWhether to reorder task and workflow sections to Sprocket’s opinionated order.
upgrade_deprecations: boolWhether to eagerly upgrade deprecated WDL constructs.
Currently this includes changing curly brace command sections ({})
into heredoc command sections (<<<>>>) and changing dollar-style
placeholders (${}) into tilde-style placeholders (~{}).
newline_style: NewlineStyleThe newline style.
quote_style: QuoteStyleThe quote style.
Implementations§
Source§impl Config
impl Config
Sourcepub fn newline_style(self, newline_style: NewlineStyle) -> Config
pub fn newline_style(self, newline_style: NewlineStyle) -> Config
Set the newline style.
Sourcepub fn quote_style(self, quote_style: QuoteStyle) -> Config
pub fn quote_style(self, quote_style: QuoteStyle) -> Config
Set the quote style.
Sourcepub fn max_line_length(self, max_line_length: MaxLineLength) -> Config
pub fn max_line_length(self, max_line_length: MaxLineLength) -> Config
Overwrite the maximum line length configuration.
Sourcepub fn sort_imports(self, sort_imports: bool) -> Config
pub fn sort_imports(self, sort_imports: bool) -> Config
Set whether import sorting is enabled.
Sourcepub fn sort_inputs(self, sort_inputs: bool) -> Config
pub fn sort_inputs(self, sort_inputs: bool) -> Config
Set whether input sorting is enabled.
Sourcepub fn trailing_commas(self, trailing_commas: bool) -> Config
pub fn trailing_commas(self, trailing_commas: bool) -> Config
Set whether trailing commas are enabled.
Sourcepub fn reorder_sections(self, reorder_sections: bool) -> Config
pub fn reorder_sections(self, reorder_sections: bool) -> Config
Set whether section reordering is enabled.
Sourcepub fn upgrade_deprecations(self, upgrade_deprecations: bool) -> Config
pub fn upgrade_deprecations(self, upgrade_deprecations: bool) -> Config
Set whether to upgrade deprecations.
Trait Implementations§
impl Copy for Config
impl Eq for Config
Source§impl JsonSchema for Config
impl JsonSchema for Config
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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