Dagger
Search

markdown

The markdown linter used to develop Dagger

Installation

dagger install github.com/dagger/dagger/linters/markdown@11fc069469670dc49743224cb4f888c88bd03aec

Entrypoint

Return Type
Markdown
Example
func (m *myModule) example() *Markdown  {
	return dag.
			Markdown()
}
@function
def example() -> dag.Markdown:
	return (
		dag.markdown()
	)
@func()
example(): Markdown {
	return dag
		.markdown()
}

Types

Markdown 🔗

rules() 🔗

Return the markdown linting rules file

Return Type
File !
Example
func (m *myModule) example() *File  {
	return dag.
			Markdown().
			Rules()
}
@function
def example() -> dagger.File:
	return (
		dag.markdown()
		.rules()
	)
@func()
example(): File {
	return dag
		.markdown()
		.rules()
}

container() 🔗

Build a container with a markdown linter tool installed

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-Source directory to lint
Example
func (m *myModule) example(source *Directory) *Container  {
	return dag.
			Markdown().
			Container(source)
}
@function
def example(source: dagger.Directory) -> dagger.Container:
	return (
		dag.markdown()
		.container(source)
	)
@func()
example(source: Directory): Container {
	return dag
		.markdown()
		.container(source)
}

fix() 🔗

Fix simple markdown errors

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
Example
func (m *myModule) example(source *Directory) *Directory  {
	return dag.
			Markdown().
			Fix(source)
}
@function
def example(source: dagger.Directory) -> dagger.Directory:
	return (
		dag.markdown()
		.fix(source)
	)
@func()
example(source: Directory): Directory {
	return dag
		.markdown()
		.fix(source)
}

lint() 🔗

Check a source directory for linter errors

Return Type
Report !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-Source directory to lint
Example
func (m *myModule) example(source *Directory) *MarkdownReport  {
	return dag.
			Markdown().
			Lint(source)
}
@function
def example(source: dagger.Directory) -> dag.MarkdownReport:
	return (
		dag.markdown()
		.lint(source)
	)
@func()
example(source: Directory): MarkdownReport {
	return dag
		.markdown()
		.lint(source)
}

Report 🔗

json() 🔗

Return Type
String !
Example
func (m *myModule) example(ctx context.Context, source *Directory) string  {
	return dag.
			Markdown().
			Lint(source).
			Json(ctx)
}
@function
async def example(source: dagger.Directory) -> str:
	return await (
		dag.markdown()
		.lint(source)
		.json()
	)
@func()
async example(source: Directory): Promise<string> {
	return dag
		.markdown()
		.lint(source)
		.json()
}

checks() 🔗

Return Type
[Check ! ] !
Arguments
NameTypeDefault ValueDescription
limitInteger 0Only return the first N checks
Example
func (m *myModule) example(source *Directory) []*MarkdownCheck  {
	return dag.
			Markdown().
			Lint(source).
			Checks()
}
@function
def example(source: dagger.Directory) -> List[dag.MarkdownCheck]:
	return (
		dag.markdown()
		.lint(source)
		.checks()
	)
@func()
example(source: Directory): MarkdownCheck[] {
	return dag
		.markdown()
		.lint(source)
		.checks()
}

files() 🔗

Return Type
Directory !
Example
func (m *myModule) example(source *Directory) *Directory  {
	return dag.
			Markdown().
			Lint(source).
			Files()
}
@function
def example(source: dagger.Directory) -> dagger.Directory:
	return (
		dag.markdown()
		.lint(source)
		.files()
	)
@func()
example(source: Directory): Directory {
	return dag
		.markdown()
		.lint(source)
		.files()
}

Check 🔗

A single lint check

fileName() 🔗

Return Type
String !
Example
Function MarkdownCheck.fileName is not accessible from the markdown module
Function MarkdownCheck.fileName is not accessible from the markdown module
Function MarkdownCheck.fileName is not accessible from the markdown module

lineNumber() 🔗

Return Type
Integer !
Example
Function MarkdownCheck.lineNumber is not accessible from the markdown module
Function MarkdownCheck.lineNumber is not accessible from the markdown module
Function MarkdownCheck.lineNumber is not accessible from the markdown module

ruleNames() 🔗

Return Type
[String ! ] !
Example
Function MarkdownCheck.ruleNames is not accessible from the markdown module
Function MarkdownCheck.ruleNames is not accessible from the markdown module
Function MarkdownCheck.ruleNames is not accessible from the markdown module

ruleDescription() 🔗

Return Type
String !
Example
Function MarkdownCheck.ruleDescription is not accessible from the markdown module
Function MarkdownCheck.ruleDescription is not accessible from the markdown module
Function MarkdownCheck.ruleDescription is not accessible from the markdown module

ruleInformation() 🔗

Return Type
String !
Example
Function MarkdownCheck.ruleInformation is not accessible from the markdown module
Function MarkdownCheck.ruleInformation is not accessible from the markdown module
Function MarkdownCheck.ruleInformation is not accessible from the markdown module

errorDetail() 🔗

Return Type
String !
Example
Function MarkdownCheck.errorDetail is not accessible from the markdown module
Function MarkdownCheck.errorDetail is not accessible from the markdown module
Function MarkdownCheck.errorDetail is not accessible from the markdown module

errorContext() 🔗

Return Type
String !
Example
Function MarkdownCheck.errorContext is not accessible from the markdown module
Function MarkdownCheck.errorContext is not accessible from the markdown module
Function MarkdownCheck.errorContext is not accessible from the markdown module

json() 🔗

JSON-encoded check

Return Type
String !
Example
Function MarkdownCheck.json is not accessible from the markdown module
Function MarkdownCheck.json is not accessible from the markdown module
Function MarkdownCheck.json is not accessible from the markdown module

file() 🔗

Return Type
File !
Example
Function MarkdownCheck.file is not accessible from the markdown module
Function MarkdownCheck.file is not accessible from the markdown module
Function MarkdownCheck.file is not accessible from the markdown module

fix() 🔗

Return Type
File !
Example
Function MarkdownCheck.fix is not accessible from the markdown module
Function MarkdownCheck.fix is not accessible from the markdown module
Function MarkdownCheck.fix is not accessible from the markdown module

diff() 🔗

Return Type
String !
Example
Function MarkdownCheck.diff is not accessible from the markdown module
Function MarkdownCheck.diff is not accessible from the markdown module
Function MarkdownCheck.diff is not accessible from the markdown module

format() 🔗

Return Type
String !
Arguments
NameTypeDefault ValueDescription
textString !-No description provided
Example
Function MarkdownCheck.format is not accessible from the markdown module
Function MarkdownCheck.format is not accessible from the markdown module
Function MarkdownCheck.format is not accessible from the markdown module