linting
This module has been generated via dagger init and serves as a reference tobasic module structure as you get started with Dagger.
Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.
The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.
Installation
dagger install github.com/stuttgart-things/dagger/linting@v0.74.0Entrypoint
Return Type
Linting Example
dagger -m github.com/stuttgart-things/dagger/linting@53a955312c5fc74b04edf1dc4f12831e5177b118 call \
func (m *MyModule) Example() *dagger.Linting {
return dag.
Linting()
}@function
def example() -> dagger.Linting:
return (
dag.linting()
)@func()
example(): Linting {
return dag
.linting()
}Types
Linting 🔗
baseImage() 🔗
Return Type
String ! Example
dagger -m github.com/stuttgart-things/dagger/linting@53a955312c5fc74b04edf1dc4f12831e5177b118 call \
base-imagefunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Linting().
BaseImage(ctx)
}@function
async def example() -> str:
return await (
dag.linting()
.base_image()
)@func()
async example(): Promise<string> {
return dag
.linting()
.baseImage()
}lintYaml() 🔗
Return Type
File !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| src | Directory ! | - | No description provided |
| configPath | String | ".yamllint" | LintYAML lints YAML files in the provided directory |
| outputFile | String | "yamllint-findings.txt" | No description provided |
Example
dagger -m github.com/stuttgart-things/dagger/linting@53a955312c5fc74b04edf1dc4f12831e5177b118 call \
lint-yaml --src DIR_PATHfunc (m *MyModule) Example(src *dagger.Directory) *dagger.File {
return dag.
Linting().
LintYaml(src)
}@function
def example(src: dagger.Directory) -> dagger.File:
return (
dag.linting()
.lint_yaml(src)
)@func()
example(src: Directory): File {
return dag
.linting()
.lintYaml(src)
}lintMarkdown() 🔗
Return Type
File !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| src | Directory ! | - | No description provided |
| configPath | String | ".mdlrc" | LintMarkdown lints Markdown files in the provided directory |
| outputFile | String | "markdown-findings.txt" | No description provided |
Example
dagger -m github.com/stuttgart-things/dagger/linting@53a955312c5fc74b04edf1dc4f12831e5177b118 call \
lint-markdown --src DIR_PATHfunc (m *MyModule) Example(src *dagger.Directory) *dagger.File {
return dag.
Linting().
LintMarkdown(src)
}@function
def example(src: dagger.Directory) -> dagger.File:
return (
dag.linting()
.lint_markdown(src)
)@func()
example(src: Directory): File {
return dag
.linting()
.lintMarkdown(src)
}runPreCommit() 🔗
Return Type
File !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| src | Directory ! | - | No description provided |
| configPath | String | ".pre-commit-config.yaml" | LintPreCommit runs pre-commit hooks on the provided directory |
| outputFile | String | "pre-commit-findings.txt" | No description provided |
| skipHooks | [String ! ] | - | No description provided |
Example
dagger -m github.com/stuttgart-things/dagger/linting@53a955312c5fc74b04edf1dc4f12831e5177b118 call \
run-pre-commit --src DIR_PATHfunc (m *MyModule) Example(src *dagger.Directory) *dagger.File {
return dag.
Linting().
RunPreCommit(src)
}@function
def example(src: dagger.Directory) -> dagger.File:
return (
dag.linting()
.run_pre_commit(src)
)@func()
example(src: Directory): File {
return dag
.linting()
.runPreCommit(src)
}