yamllint
yamllint does not only check for syntax validity, but also for weirdnesseslike key repetition and cosmetic problems such as lines length, trailing spaces, indentation, etc.
Installation
dagger install github.com/softwaredevelop/daggerverse/yamllint@f9a9366ca0e07c172ce325edbcb911e3f922922bEntrypoint
Return Type
Yamllint !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| image | String | - | Custom image reference in "repository:tag" format to use as a base container. |
Example
dagger -m github.com/softwaredevelop/daggerverse/yamllint@f9a9366ca0e07c172ce325edbcb911e3f922922b call \
func (m *MyModule) Example() *dagger.Yamllint {
return dag.
Yamllint()
}@function
def example() -> dagger.Yamllint:
return (
dag.yamllint()
)@func()
example(): Yamllint {
return dag
.yamllint()
}Types
Yamllint 🔗
Yamllint provides functions for checking YAML files.
check() 🔗
Check runs yamllint on the source directory. By default, it ignores line-length warnings. An optional configuration file can be provided.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | Source directory containing YAML files. |
| config | File | - | Optional configuration file (.yamllint). |
Example
dagger -m github.com/softwaredevelop/daggerverse/yamllint@f9a9366ca0e07c172ce325edbcb911e3f922922b call \
check --source DIR_PATHfunc (m *MyModule) Example(source *dagger.Directory) *dagger.Container {
return dag.
Yamllint().
Check(source)
}@function
def example(source: dagger.Directory) -> dagger.Container:
return (
dag.yamllint()
.check(source)
)@func()
example(source: Directory): Container {
return dag
.yamllint()
.check(source)
}checkWithConfig() 🔗
CheckWithConfig runs yamllint using an explicitly provided configuration file. The configuration file is mandatory for this function.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | Source directory containing YAML files. |
| file | File ! | - | Mandatory configuration file for yamllint. |
Example
dagger -m github.com/softwaredevelop/daggerverse/yamllint@f9a9366ca0e07c172ce325edbcb911e3f922922b call \
check-with-config --source DIR_PATH --file file:pathfunc (m *MyModule) Example(source *dagger.Directory, file *dagger.File) *dagger.Container {
return dag.
Yamllint().
Checkwithconfig(source, file)
}@function
def example(source: dagger.Directory, file: dagger.File) -> dagger.Container:
return (
dag.yamllint()
.checkwithconfig(source, file)
)@func()
example(source: Directory, file: File): Container {
return dag
.yamllint()
.checkWithConfig(source, file)
}