Dagger
Search

yamllint

Yamllint provides utility to lint YAML files without needing to download locally with pip or homebrew. It provides nearly all functionality given by yamllint, only exluding stdin uses. See https://github.com/adrienverge/yamllint for more information.

Installation

dagger install github.com/act3-ai/dagger/yamllint@7bf7644e904bb42fd78d39e950781ce5426c7951

Entrypoint

Return Type
Yamllint !
Arguments
NameTypeDefault ValueDescription
containerContainer -Custom container to use as a base container. Must have 'yamllint' available on PATH.
versionString "latest"Version of yamllint to use, defaults to latest version available to apk.
Example
dagger -m github.com/act3-ai/dagger/yamllint@7bf7644e904bb42fd78d39e950781ce5426c7951 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 🔗

container() 🔗

Return Type
Container !
Example
dagger -m github.com/act3-ai/dagger/yamllint@7bf7644e904bb42fd78d39e950781ce5426c7951 call \
 container
func (m *MyModule) Example() *dagger.Container  {
	return dag.
			Yamllint().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.yamllint()
		.container()
	)
@func()
example(): Container {
	return dag
		.yamllint()
		.container()
}

run() 🔗

Run ‘yamllint’ with all previously provided options.

May be used as a “catch-all” in case functions are not implemented.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-directory containing, but not limited to, YAML files to be linted.
extraFlags[String ! ] -flags, without 'yamllint'
Example
dagger -m github.com/act3-ai/dagger/yamllint@7bf7644e904bb42fd78d39e950781ce5426c7951 call \
 run --src DIR_PATH
func (m *MyModule) Example(src *dagger.Directory) *dagger.Container  {
	return dag.
			Yamllint().
			Run(src)
}
@function
def example(src: dagger.Directory) -> dagger.Container:
	return (
		dag.yamllint()
		.run(src)
	)
@func()
example(src: Directory): Container {
	return dag
		.yamllint()
		.run(src)
}

listFiles() 🔗

List YAML files that can be linted.

e.g. ‘yamllint –list-files’.

Return Type
[String ! ] !
Example
dagger -m github.com/act3-ai/dagger/yamllint@7bf7644e904bb42fd78d39e950781ce5426c7951 call \
 list-files
func (m *MyModule) Example(ctx context.Context) []string  {
	return dag.
			Yamllint().
			ListFiles(ctx)
}
@function
async def example() -> List[str]:
	return await (
		dag.yamllint()
		.list_files()
	)
@func()
async example(): Promise<string[]> {
	return dag
		.yamllint()
		.listFiles()
}

withConfig() 🔗

Mount a custom configuration file.

e.g. ‘yamllint –config-file ’.

Return Type
Yamllint !
Arguments
NameTypeDefault ValueDescription
configFile !-configuration file
Example
dagger -m github.com/act3-ai/dagger/yamllint@7bf7644e904bb42fd78d39e950781ce5426c7951 call \
 with-config --config file:path
func (m *MyModule) Example(config *dagger.File) *dagger.Yamllint  {
	return dag.
			Yamllint().
			WithConfig(config)
}
@function
def example(config: dagger.File) -> dagger.Yamllint:
	return (
		dag.yamllint()
		.with_config(config)
	)
@func()
example(config: File): Yamllint {
	return dag
		.yamllint()
		.withConfig(config)
}

withFormat() 🔗

Specify output format.

e.g. ‘yamllint –format ’.

Return Type
Yamllint !
Arguments
NameTypeDefault ValueDescription
formatString !-output format. Supported values: 'parsable',' standard', 'colored', 'github', or 'auto'.
Example
dagger -m github.com/act3-ai/dagger/yamllint@7bf7644e904bb42fd78d39e950781ce5426c7951 call \
 with-format --format string
func (m *MyModule) Example(format string) *dagger.Yamllint  {
	return dag.
			Yamllint().
			WithFormat(format)
}
@function
def example(format: str) -> dagger.Yamllint:
	return (
		dag.yamllint()
		.with_format(format)
	)
@func()
example(format: string): Yamllint {
	return dag
		.yamllint()
		.withFormat(format)
}

withStrict() 🔗

Return non-zero exit code on warnings as well as errors.

e.g. ‘yamllint –strict’.

Return Type
Yamllint !
Example
dagger -m github.com/act3-ai/dagger/yamllint@7bf7644e904bb42fd78d39e950781ce5426c7951 call \
 with-strict
func (m *MyModule) Example() *dagger.Yamllint  {
	return dag.
			Yamllint().
			WithStrict()
}
@function
def example() -> dagger.Yamllint:
	return (
		dag.yamllint()
		.with_strict()
	)
@func()
example(): Yamllint {
	return dag
		.yamllint()
		.withStrict()
}

withNoWarnings() 🔗

Output only error level problems.

e.g. ‘yamllint –no-warnings’.

Return Type
Yamllint !
Example
dagger -m github.com/act3-ai/dagger/yamllint@7bf7644e904bb42fd78d39e950781ce5426c7951 call \
 with-no-warnings
func (m *MyModule) Example() *dagger.Yamllint  {
	return dag.
			Yamllint().
			WithNoWarnings()
}
@function
def example() -> dagger.Yamllint:
	return (
		dag.yamllint()
		.with_no_warnings()
	)
@func()
example(): Yamllint {
	return dag
		.yamllint()
		.withNoWarnings()
}