Struct taplo_cli::config::Rule [−][src]
pub struct Rule {
pub name: Option<String>,
pub include: Option<Vec<String>>,
pub exclude: Option<Vec<String>>,
pub keys: Option<Vec<String>>,
pub options: Options,
}Expand description
A rule to override options by either name or file.
Fields
name: Option<String>The name of the rule.
Used in taplo::<name> comments.
include: Option<Vec<String>>Files this rule is valid for.
A list of Unix-like glob path patterns.
Relative paths are not relative to the configuration file, but rather depends on the tool using the configuration.
Omitting this property includes all files, however an empty array will include none.
exclude: Option<Vec<String>>Files that are excluded from this rule.
A list of Unix-like glob path patterns.
Relative paths are not relative to the configuration file, but rather depends on the tool using the configuration.
This has priority over include.
keys: Option<Vec<String>>Keys the rule is valid for in a document.
A list of Unix-like glob dotted key patterns.
This allows enabling the rule for specific paths in the document.
For example:
package.metadatawill enable the rule for everything inside thepackage.metadatatable, including itself.
If omitted, the rule will always be valid for all keys.
options: OptionsTrait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Rule
impl UnwindSafe for Rule
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more