yamllint
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@v0.1.1
Entrypoint
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@9aa788cf11365f091d50cd5ef0d30e2db0716a51 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() 🔗
Run ‘yamllint’ with all previously provided options.
May be used as a “catch-all” in case functions are not implemented.
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
ignoreError | Boolean | - | Output results, without an error. |
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@9aa788cf11365f091d50cd5ef0d30e2db0716a51 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@9aa788cf11365f091d50cd5ef0d30e2db0716a51 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@9aa788cf11365f091d50cd5ef0d30e2db0716a51 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@9aa788cf11365f091d50cd5ef0d30e2db0716a51 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()
}