Dagger
Search

yamllint

Yamllint is a utility that lints YAML files without needing to download locally with pip or homebrew.

Installation

dagger install github.com/act3-ai/dagger/yamllint@v0.3.1

Entrypoint

Return Type
Yamllint !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-Source directory containing markdown files to be linted.
baseContainer -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.
configFile -Configuration file.
Example
dagger -m github.com/act3-ai/dagger/yamllint@bcdb23d2448b901eae1002a3674928dda2b3d0f4 call \
 --src DIR_PATH
func (m *MyModule) Example(src *dagger.Directory) *dagger.Yamllint  {
	return dag.
			Yamllint(src)
}
@function
def example(src: dagger.Directory, ) -> dagger.Yamllint:
	return (
		dag.yamllint(src)
	)
@func()
example(src: Directory, ): Yamllint {
	return dag
		.yamllint(src)
}

Types

Yamllint 🔗

lint() 🔗

Runs yamllint with all previously provided ‘with’ options. Returns a container that will fail on any error.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
formatString "auto"Output format. Supported values: 'parsable',' standard', 'colored', 'github', or 'auto'.
extraArgs[String ! ] -Additional arguments to pass to yamllint, without 'yamllint' itself.
Example
dagger -m github.com/act3-ai/dagger/yamllint@bcdb23d2448b901eae1002a3674928dda2b3d0f4 call \
 --src DIR_PATH lint
func (m *MyModule) Example(src *dagger.Directory) *dagger.Container  {
	return dag.
			Yamllint(src).
			Lint()
}
@function
def example(src: dagger.Directory, ) -> dagger.Container:
	return (
		dag.yamllint(src)
		.lint()
	)
@func()
example(src: Directory, ): Container {
	return dag
		.yamllint(src)
		.lint()
}

report() 🔗

Runs ‘yamllint’ with all previously provided ‘with’ options and returns a report file.

Return Type
File !
Arguments
NameTypeDefault ValueDescription
formatString "auto"Output format. Supported values: 'parsable',' standard', 'colored', 'github', or 'auto'.
extraArgs[String ! ] -Additional arguments to pass to yamllint, without 'yamllint' itself.
Example
dagger -m github.com/act3-ai/dagger/yamllint@bcdb23d2448b901eae1002a3674928dda2b3d0f4 call \
 --src DIR_PATH report
func (m *MyModule) Example(src *dagger.Directory) *dagger.File  {
	return dag.
			Yamllint(src).
			Report()
}
@function
def example(src: dagger.Directory, ) -> dagger.File:
	return (
		dag.yamllint(src)
		.report()
	)
@func()
example(src: Directory, ): File {
	return dag
		.yamllint(src)
		.report()
}

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@bcdb23d2448b901eae1002a3674928dda2b3d0f4 call \
 --src DIR_PATH list-files
func (m *MyModule) Example(ctx context.Context, src *dagger.Directory) []string  {
	return dag.
			Yamllint(src).
			ListFiles(ctx)
}
@function
async def example(src: dagger.Directory, ) -> List[str]:
	return await (
		dag.yamllint(src)
		.list_files()
	)
@func()
async example(src: Directory, ): Promise<string[]> {
	return dag
		.yamllint(src)
		.listFiles()
}

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@bcdb23d2448b901eae1002a3674928dda2b3d0f4 call \
 --src DIR_PATH with-strict
func (m *MyModule) Example(src *dagger.Directory) *dagger.Yamllint  {
	return dag.
			Yamllint(src).
			WithStrict()
}
@function
def example(src: dagger.Directory, ) -> dagger.Yamllint:
	return (
		dag.yamllint(src)
		.with_strict()
	)
@func()
example(src: Directory, ): Yamllint {
	return dag
		.yamllint(src)
		.withStrict()
}

withNoWarnings() 🔗

Output only error level problems.

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

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