markdown
The markdown linter used to develop Dagger
Installation
dagger install github.com/dagger/dagger/linters/markdown@8c5f0c2d08048aa9d9a9f1b3b986368af4b788e5Entrypoint
Return Type
Markdown Example
dagger -m github.com/dagger/dagger/linters/markdown@8c5f0c2d08048aa9d9a9f1b3b986368af4b788e5 call \
func (m *MyModule) Example() *dagger.Markdown {
return dag.
Markdown()
}@function
def example() -> dagger.Markdown:
return (
dag.markdown()
)@func()
example(): Markdown {
return dag
.markdown()
}Types
Markdown 🔗
rules() 🔗
Return the markdown linting rules file
Return Type
File ! Example
dagger -m github.com/dagger/dagger/linters/markdown@8c5f0c2d08048aa9d9a9f1b3b986368af4b788e5 call \
rulesfunc (m *MyModule) Example() *dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | Source directory to lint |
Example
dagger -m github.com/dagger/dagger/linters/markdown@8c5f0c2d08048aa9d9a9f1b3b986368af4b788e5 call \
container --source DIR_PATHfunc (m *MyModule) Example(source *dagger.Directory) *dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | No description provided |
Example
dagger -m github.com/dagger/dagger/linters/markdown@8c5f0c2d08048aa9d9a9f1b3b986368af4b788e5 call \
fix --source DIR_PATHfunc (m *MyModule) Example(source *dagger.Directory) *dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | Source directory to lint |
Example
dagger -m github.com/dagger/dagger/linters/markdown@8c5f0c2d08048aa9d9a9f1b3b986368af4b788e5 call \
lint --source DIR_PATHfunc (m *MyModule) Example(source *dagger.Directory) *dagger.MarkdownReport {
return dag.
Markdown().
Lint(source)
}@function
def example(source: dagger.Directory) -> dagger.MarkdownReport:
return (
dag.markdown()
.lint(source)
)@func()
example(source: Directory): MarkdownReport {
return dag
.markdown()
.lint(source)
}Report 🔗
json() 🔗
Return Type
String ! Example
dagger -m github.com/dagger/dagger/linters/markdown@8c5f0c2d08048aa9d9a9f1b3b986368af4b788e5 call \
lint --source DIR_PATH \
jsonfunc (m *MyModule) Example(ctx context.Context, source *dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| limit | Integer | 0 | Only return the first N checks |
Example
dagger -m github.com/dagger/dagger/linters/markdown@8c5f0c2d08048aa9d9a9f1b3b986368af4b788e5 call \
lint --source DIR_PATH \
checksfunc (m *MyModule) Example(source *dagger.Directory) []*dagger.MarkdownCheck {
return dag.
Markdown().
Lint(source).
Checks()
}@function
def example(source: dagger.Directory) -> List[dagger.MarkdownCheck]:
return (
dag.markdown()
.lint(source)
.checks()
)@func()
example(source: Directory): MarkdownCheck[] {
return dag
.markdown()
.lint(source)
.checks()
}files() 🔗
Return Type
Directory ! Example
dagger -m github.com/dagger/dagger/linters/markdown@8c5f0c2d08048aa9d9a9f1b3b986368af4b788e5 call \
lint --source DIR_PATH \
filesfunc (m *MyModule) Example(source *dagger.Directory) *dagger.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 moduleFunction MarkdownCheck.fileName is not accessible from the markdown moduleFunction MarkdownCheck.fileName is not accessible from the markdown moduleFunction MarkdownCheck.fileName is not accessible from the markdown modulelineNumber() 🔗
Return Type
Integer ! Example
Function MarkdownCheck.lineNumber is not accessible from the markdown moduleFunction MarkdownCheck.lineNumber is not accessible from the markdown moduleFunction MarkdownCheck.lineNumber is not accessible from the markdown moduleFunction MarkdownCheck.lineNumber is not accessible from the markdown moduleruleNames() 🔗
Return Type
[String ! ] ! Example
Function MarkdownCheck.ruleNames is not accessible from the markdown moduleFunction MarkdownCheck.ruleNames is not accessible from the markdown moduleFunction MarkdownCheck.ruleNames is not accessible from the markdown moduleFunction MarkdownCheck.ruleNames is not accessible from the markdown moduleruleDescription() 🔗
Return Type
String ! Example
Function MarkdownCheck.ruleDescription is not accessible from the markdown moduleFunction MarkdownCheck.ruleDescription is not accessible from the markdown moduleFunction MarkdownCheck.ruleDescription is not accessible from the markdown moduleFunction MarkdownCheck.ruleDescription is not accessible from the markdown moduleruleInformation() 🔗
Return Type
String ! Example
Function MarkdownCheck.ruleInformation is not accessible from the markdown moduleFunction MarkdownCheck.ruleInformation is not accessible from the markdown moduleFunction MarkdownCheck.ruleInformation is not accessible from the markdown moduleFunction MarkdownCheck.ruleInformation is not accessible from the markdown moduleerrorDetail() 🔗
Return Type
String ! Example
Function MarkdownCheck.errorDetail is not accessible from the markdown moduleFunction MarkdownCheck.errorDetail is not accessible from the markdown moduleFunction MarkdownCheck.errorDetail is not accessible from the markdown moduleFunction MarkdownCheck.errorDetail is not accessible from the markdown moduleerrorContext() 🔗
Return Type
String ! Example
Function MarkdownCheck.errorContext is not accessible from the markdown moduleFunction MarkdownCheck.errorContext is not accessible from the markdown moduleFunction MarkdownCheck.errorContext is not accessible from the markdown moduleFunction MarkdownCheck.errorContext is not accessible from the markdown modulejson() 🔗
JSON-encoded check
Return Type
String ! Example
Function MarkdownCheck.json is not accessible from the markdown moduleFunction MarkdownCheck.json is not accessible from the markdown moduleFunction MarkdownCheck.json is not accessible from the markdown moduleFunction MarkdownCheck.json is not accessible from the markdown modulefile() 🔗
Return Type
File ! Example
Function MarkdownCheck.file is not accessible from the markdown moduleFunction MarkdownCheck.file is not accessible from the markdown moduleFunction MarkdownCheck.file is not accessible from the markdown moduleFunction MarkdownCheck.file is not accessible from the markdown modulefix() 🔗
Return Type
File ! Example
Function MarkdownCheck.fix is not accessible from the markdown moduleFunction MarkdownCheck.fix is not accessible from the markdown moduleFunction MarkdownCheck.fix is not accessible from the markdown moduleFunction MarkdownCheck.fix is not accessible from the markdown modulediff() 🔗
Return Type
String ! Example
Function MarkdownCheck.diff is not accessible from the markdown moduleFunction MarkdownCheck.diff is not accessible from the markdown moduleFunction MarkdownCheck.diff is not accessible from the markdown moduleFunction MarkdownCheck.diff is not accessible from the markdown moduleformat() 🔗
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| text | String ! | - | No description provided |
Example
Function MarkdownCheck.format is not accessible from the markdown moduleFunction MarkdownCheck.format is not accessible from the markdown moduleFunction MarkdownCheck.format is not accessible from the markdown moduleFunction MarkdownCheck.format is not accessible from the markdown module