Dagger
Search

markdownlint

Markdownlint provides utilities for running markdownlint-cli2 without installing locally with npm, brew, or docker. 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@bd1f5007ca5a056ccdc8334bcc2dd0bce5e3d635

Entrypoint

Return Type
Markdownlint !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-Source directory containing markdown files to be linted.
baseContainer -Custom container to use as a base container. Must have 'markdownlint-cli2' available on PATH.
versionString "latest"Version (image tag) to use as a markdownlint-cli2 binary source.
configFile -Configuration file.
globs[String ! ] -Glob expressions for markdown file identification.
Example
dagger -m github.com/act3-ai/dagger/markdownlint@bd1f5007ca5a056ccdc8334bcc2dd0bce5e3d635 call \
 --src DIR_PATH
func (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@bd1f5007ca5a056ccdc8334bcc2dd0bce5e3d635 call \
 --src DIR_PATH base
func (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()
}

run() 🔗

Run markdownlint-cli2. Typical usage is to run to detect linting errors, and, if an error is returned, re-run with --results to return the output file or --results contents to output to stdout.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
extraArgs[String ! ] -Additional arguments to pass to markdownlint-cli2, without 'markdownlint-cli2' itself.
ignoreErrorBoolean -Output results, ignoring errors.
Example
dagger -m github.com/act3-ai/dagger/markdownlint@bd1f5007ca5a056ccdc8334bcc2dd0bce5e3d635 call \
 --src DIR_PATH run
func (m *MyModule) Example(ctx context.Context, src *dagger.Directory) string  {
	return dag.
			Markdownlint(src).
			Run(ctx)
}
@function
async def example(src: dagger.Directory, ) -> str:
	return await (
		dag.markdownlint(src)
		.run()
	)
@func()
async example(src: Directory, ): Promise<string> {
	return dag
		.markdownlint(src)
		.run()
}

autoFix() 🔗

AutoFix updates files to resolve fixable issues (can be overriden in configuration). It returns the entire source directory, use export --path=<path-to-source> to write the updates to the host.

e.g. ‘markdownlint-cli2 –fix’.

Return Type
Directory !
Example
dagger -m github.com/act3-ai/dagger/markdownlint@bd1f5007ca5a056ccdc8334bcc2dd0bce5e3d635 call \
 --src DIR_PATH auto-fix
func (m *MyModule) Example(src *dagger.Directory) *dagger.Directory  {
	return dag.
			Markdownlint(src).
			AutoFix()
}
@function
def example(src: dagger.Directory, ) -> dagger.Directory:
	return (
		dag.markdownlint(src)
		.auto_fix()
	)
@func()
example(src: Directory, ): Directory {
	return dag
		.markdownlint(src)
		.autoFix()
}