Dagger
Search

yamllint

yamllint does not only check for syntax validity, but also for weirdnesses
like key repetition and cosmetic problems such as lines length, trailing spaces, indentation, etc.

Installation

dagger install github.com/softwaredevelop/daggerverse/yamllint@f9a9366ca0e07c172ce325edbcb911e3f922922b

Entrypoint

Return Type
Yamllint !
Arguments
NameTypeDefault ValueDescription
imageString -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
NameTypeDefault ValueDescription
sourceDirectory !-

Source directory containing YAML files.

configFile -

Optional configuration file (.yamllint).

Example
dagger -m github.com/softwaredevelop/daggerverse/yamllint@f9a9366ca0e07c172ce325edbcb911e3f922922b call \
 check --source DIR_PATH
func (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
NameTypeDefault ValueDescription
sourceDirectory !-

Source directory containing YAML files.

fileFile !-

Mandatory configuration file for yamllint.

Example
dagger -m github.com/softwaredevelop/daggerverse/yamllint@f9a9366ca0e07c172ce325edbcb911e3f922922b call \
 check-with-config --source DIR_PATH --file file:path
func (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)
}