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.2.1Entrypoint
Return Type
Yamllint !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| src | Directory ! | - | Source directory containing markdown files to be linted. |
| base | Container | - | Custom container to use as a base container. Must have 'yamllint' available on PATH. |
| version | String | "latest" | Version of yamllint to use, defaults to latest version available to apk. |
| config | File | - | Configuration file. |
Example
dagger -m github.com/act3-ai/dagger/yamllint@d31d544abd9329712ff72239a48a82cd08438eb7 call \
--src DIR_PATHfunc (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.
May be used as a “catch-all” in case functions are not implemented via extraArgs.
Return Type
Results !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| format | String | "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@d31d544abd9329712ff72239a48a82cd08438eb7 call \
--src DIR_PATH lintfunc (m *MyModule) Example(src *dagger.Directory) *dagger.YamllintResults {
return dag.
Yamllint(src).
Lint()
}@function
def example(src: dagger.Directory, ) -> dagger.YamllintResults:
return (
dag.yamllint(src)
.lint()
)@func()
example(src: Directory, ): YamllintResults {
return dag
.yamllint(src)
.lint()
}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@d31d544abd9329712ff72239a48a82cd08438eb7 call \
--src DIR_PATH list-filesfunc (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@d31d544abd9329712ff72239a48a82cd08438eb7 call \
--src DIR_PATH with-strictfunc (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@d31d544abd9329712ff72239a48a82cd08438eb7 call \
--src DIR_PATH with-no-warningsfunc (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()
}Results 🔗
results() 🔗
returns results of yamllint as a file
Return Type
File ! Example
dagger -m github.com/act3-ai/dagger/yamllint@d31d544abd9329712ff72239a48a82cd08438eb7 call \
lint \
resultsfunc (m *MyModule) Example() *dagger.File {
return dag.
Yamllint().
Lint().
Results()
}@function
def example() -> dagger.File:
return (
dag.yamllint()
.lint()
.results()
)@func()
example(): File {
return dag
.yamllint()
.lint()
.results()
}check() 🔗
Check for any errors running yamllint
Return Type
Void ! Example
dagger -m github.com/act3-ai/dagger/yamllint@d31d544abd9329712ff72239a48a82cd08438eb7 call \
lint \
checkfunc (m *MyModule) Example(ctx context.Context) {
return dag.
Yamllint().
Lint().
Check(ctx)
}@function
async def example() -> None:
return await (
dag.yamllint()
.lint()
.check()
)@func()
async example(): Promise<void> {
return dag
.yamllint()
.lint()
.check()
}