Format
Formatters help your code be consistent, beautiful and more maintainable.
formatBash
Ensure that Bash code is formatted according to shfmt.
Types:
- formatBash:
- enable (
boolean
): Optional. Defaults to false. - targets (
listOf str
): Optional. Files or directories (relative to the project) to format. Defaults to the entire project.
- enable (
Example:
formatMarkdown
Warning
This function is only available on Linux at the moment.
Ensure that Markdown code is formatted according to doctoc.
Types:
- formatMarkdown:
- enable (
boolean
): Optional. Defaults tofalse
. - doctocArgs (
listOf str
): Optional. Extra CLI flags to propagate to doctoc. Defaults to[ ]
. - targets (
listOf str
): File s (relative to the project) to format.
- enable (
Example:
formatNix
Ensure that Nix code is formatted according to nixfmt.
Types:
- formatNix:
- enable (
boolean
): Optional. Defaults tofalse
. - targets (
listOf str
): Optional. Files or directories (relative to the project) to format. Defaults to the entire project.
- enable (
Example:
formatTerraform
Ensure that Terraform code is formatted according to Terraform FMT.
Types:
- formatTerraform:
- enable (
boolean
): Optional. Defaults tofalse
. - targets (
listOf str
): Optional. Files or directories (relative to the project) to format. Defaults to the entire project.
- enable (
Example:
formatYaml
Ensure that YAML code is formatted according to yamlfix.
Types:
- formatYaml:
- enable (
boolean
): Optional. Defaults tofalse
. - targets (
listOf str
): Optional. Files or directories (relative to the project) to format. Defaults to the entire project.
- enable (
Example: