markdownlint
See https://github.com/DavidAnson/markdownlint-cli2 for more info. Most configuration should be done in '.markdownlint-cli2.yaml'within the source directory, or provided using 'WithConfig'.
Installation
dagger install github.com/act3-ai/dagger/markdownlint@v0.4.1Entrypoint
Return Type
Markdownlint !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 'markdownlint-cli2' available on PATH. |
| version | String | "latest" | Version (image tag) to use as a markdownlint-cli2 binary source. |
| config | File | - | Configuration file. |
Example
dagger -m github.com/act3-ai/dagger/markdownlint@9f279eb51a916e50db1ea30bc637e8e64aef6c59 call \
--src DIR_PATHfunc (m *MyModule) Example(src *dagger.Directory) *dagger.Markdownlint {
return dag.
Markdownlint(src)
}@function
def example(src: dagger.Directory, ) -> dagger.Markdownlint:
return (
dag.markdownlint(src)
)@func()
example(src: Directory, ): Markdownlint {
return dag
.markdownlint(src)
}Types
Markdownlint 🔗
base() 🔗
Return Type
Container ! Example
dagger -m github.com/act3-ai/dagger/markdownlint@9f279eb51a916e50db1ea30bc637e8e64aef6c59 call \
--src DIR_PATH basefunc (m *MyModule) Example(src *dagger.Directory) *dagger.Container {
return dag.
Markdownlint(src).
Base()
}@function
def example(src: dagger.Directory, ) -> dagger.Container:
return (
dag.markdownlint(src)
.base()
)@func()
example(src: Directory, ): Container {
return dag
.markdownlint(src)
.base()
}lint() 🔗
Runs markdownlint-cli2 against a given source directory. Returns a container that with fail with any errors.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| extraArgs | [String ! ] | - | Additional arguments to pass to markdownlint-cli2, without 'markdownlint-cli2' itself. |
Example
dagger -m github.com/act3-ai/dagger/markdownlint@9f279eb51a916e50db1ea30bc637e8e64aef6c59 call \
--src DIR_PATH lintfunc (m *MyModule) Example(src *dagger.Directory) *dagger.Container {
return dag.
Markdownlint(src).
Lint()
}@function
def example(src: dagger.Directory, ) -> dagger.Container:
return (
dag.markdownlint(src)
.lint()
)@func()
example(src: Directory, ): Container {
return dag
.markdownlint(src)
.lint()
}report() 🔗
Runs markdownlint-cli2 and returns results in a file.
Return Type
File !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| extraArgs | [String ! ] | - | Additional arguments to pass to markdownlint-cli2, without 'markdownlint-cli2' itself. |
Example
dagger -m github.com/act3-ai/dagger/markdownlint@9f279eb51a916e50db1ea30bc637e8e64aef6c59 call \
--src DIR_PATH reportfunc (m *MyModule) Example(src *dagger.Directory) *dagger.File {
return dag.
Markdownlint(src).
Report()
}@function
def example(src: dagger.Directory, ) -> dagger.File:
return (
dag.markdownlint(src)
.report()
)@func()
example(src: Directory, ): File {
return dag
.markdownlint(src)
.report()
}fix() 🔗
AutoFix attempts to fix any linting errors reported by rules that emit fix information. Returns a Changeset that can be used to apply any changes made to the host. e.g. ‘markdownlint-cli2 –fix’.
Return Type
Changeset !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| extraArgs | [String ! ] | - | Additional arguments to pass to markdownlint-cli2, without 'markdownlint-cli2' itself. |
Example
dagger -m github.com/act3-ai/dagger/markdownlint@9f279eb51a916e50db1ea30bc637e8e64aef6c59 call \
--src DIR_PATH fixfunc (m *MyModule) Example(src *dagger.Directory) *dagger.Changeset {
return dag.
Markdownlint(src).
Fix()
}@function
def example(src: dagger.Directory, ) -> dagger.Changeset:
return (
dag.markdownlint(src)
.fix()
)@func()
example(src: Directory, ): Changeset {
return dag
.markdownlint(src)
.fix()
}