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.1.7

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@451aadc04c8aa6b5d855c5325b4a1cfbe0d1670f 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 🔗

run() 🔗

Runs ‘yamllint’ with all previously provided ‘with’ options.

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

Return Type
String !
Arguments
NameTypeDefault ValueDescription
ignoreErrorBoolean -Output results, without an error.
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@451aadc04c8aa6b5d855c5325b4a1cfbe0d1670f call \
 --src DIR_PATH run
func (m *MyModule) Example(ctx context.Context, src *dagger.Directory) string  {
	return dag.
			Yamllint(src).
			Run(ctx)
}
@function
async def example(src: dagger.Directory, ) -> str:
	return await (
		dag.yamllint(src)
		.run()
	)
@func()
async example(src: Directory, ): Promise<string> {
	return dag
		.yamllint(src)
		.run()
}

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@451aadc04c8aa6b5d855c5325b4a1cfbe0d1670f 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@451aadc04c8aa6b5d855c5325b4a1cfbe0d1670f 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@451aadc04c8aa6b5d855c5325b4a1cfbe0d1670f 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()
}