Dagger
Search

linting

This module has been generated via dagger init and serves as a reference to
basic 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.104.0

Entrypoint

Return Type
Linting
Example
dagger -m github.com/stuttgart-things/dagger/linting@21daac3b26f59ecd1564b574d3005382efd9a5e3 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@21daac3b26f59ecd1564b574d3005382efd9a5e3 call \
 base-image
func (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()
}

autoFixSecrets() 🔗

AutoFixSecrets uses a Dagger AI agent to analyze detect-secrets findings and add pragma: allowlist secret comments to flagged lines.

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-No description provided
excludeFilesString -No description provided
Example
dagger -m github.com/stuttgart-things/dagger/linting@21daac3b26f59ecd1564b574d3005382efd9a5e3 call \
 auto-fix-secrets --src DIR_PATH
func (m *MyModule) Example(src *dagger.Directory) *dagger.Directory  {
	return dag.
			Linting().
			AutoFixSecrets(src)
}
@function
def example(src: dagger.Directory) -> dagger.Directory:
	return (
		dag.linting()
		.auto_fix_secrets(src)
	)
@func()
example(src: Directory): Directory {
	return dag
		.linting()
		.autoFixSecrets(src)
}

lintMarkdown() 🔗

Return Type
File !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-No description provided
configPathString ".mdlrc"LintMarkdown lints Markdown files in the provided directory
outputFileString "markdown-findings.txt"No description provided
Example
dagger -m github.com/stuttgart-things/dagger/linting@21daac3b26f59ecd1564b574d3005382efd9a5e3 call \
 lint-markdown --src DIR_PATH
func (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)
}

lintYaml() 🔗

Return Type
File !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-No description provided
configPathString ".yamllint"LintYAML lints YAML files in the provided directory
outputFileString "yamllint-findings.txt"No description provided
Example
dagger -m github.com/stuttgart-things/dagger/linting@21daac3b26f59ecd1564b574d3005382efd9a5e3 call \
 lint-yaml --src DIR_PATH
func (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)
}

runPreCommit() 🔗

LintPreCommit runs pre-commit hooks on the provided directory

Return Type
File !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-No description provided
configPathString ".pre-commit-config.yaml"No description provided
outputFileString "pre-commit-findings.txt"No description provided
skipHooks[String ! ] -No description provided
Example
dagger -m github.com/stuttgart-things/dagger/linting@21daac3b26f59ecd1564b574d3005382efd9a5e3 call \
 run-pre-commit --src DIR_PATH
func (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)
}

scanSecrets() 🔗

ScanSecrets runs detect-secrets scan on the provided directory and returns a JSON findings report.

Return Type
File !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-No description provided
outputFileString "secret-findings.json"No description provided
excludeFilesString -No description provided
Example
dagger -m github.com/stuttgart-things/dagger/linting@21daac3b26f59ecd1564b574d3005382efd9a5e3 call \
 scan-secrets --src DIR_PATH
func (m *MyModule) Example(src *dagger.Directory) *dagger.File  {
	return dag.
			Linting().
			ScanSecrets(src)
}
@function
def example(src: dagger.Directory) -> dagger.File:
	return (
		dag.linting()
		.scan_secrets(src)
	)
@func()
example(src: Directory): File {
	return dag
		.linting()
		.scanSecrets(src)
}

validateJsonSchema() 🔗

ValidateJsonSchema runs jq empty over every file under src whose basename matches glob. Acts as a fast JSON-syntax gate for *.schema.json files. Exits non-zero if any matched file fails to parse. Exported as ValidateJsonSchema (not ValidateJSONSchema) so Dagger’s name normalizer produces the kebab form validate-json-schema rather than validate-jsonschema — keeps the CLI call matching the issue’s spec.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-No description provided
globString "**/*.schema.json"Basename glob passed to `find -name`. A leading `**/` is stripped since find already recurses by default.
Example
dagger -m github.com/stuttgart-things/dagger/linting@21daac3b26f59ecd1564b574d3005382efd9a5e3 call \
 validate-json-schema --src DIR_PATH
func (m *MyModule) Example(ctx context.Context, src *dagger.Directory) string  {
	return dag.
			Linting().
			ValidateJsonSchema(ctx, src)
}
@function
async def example(src: dagger.Directory) -> str:
	return await (
		dag.linting()
		.validate_json_schema(src)
	)
@func()
async example(src: Directory): Promise<string> {
	return dag
		.linting()
		.validateJsonSchema(src)
}