Dagger
Search

repository-linting

This module provides advanced linting, validation, and AI-powered analysis for code repositories.
It supports multi-technology linting (YAML, Markdown, etc.), merges findings, and enables automated review workflows.
The module can analyze linting reports using AI agents to deliver actionable feedback and improvement suggestions.

Key features:
- Validate and lint multiple file types in a repository
- Merge and summarize findings from different linters
- Use AI to analyze linting reports and generate human-readable reviews
- Integrate with Dagger pipelines for automated CI/CD quality gates

Designed for extensibility and integration in modern DevOps and platform engineering environments.

Installation

dagger install github.com/stuttgart-things/blueprints/repository-linting@v1.21.0

Entrypoint

Return Type
RepositoryLinting
Example
dagger -m github.com/stuttgart-things/blueprints/repository-linting@22419b8854615da3a92961439f49c00e4f21e3ba call \
func (m *MyModule) Example() *dagger.RepositoryLinting  {
	return dag.
			RepositoryLinting()
}
@function
def example() -> dagger.RepositoryLinting:
	return (
		dag.repository_linting()
	)
@func()
example(): RepositoryLinting {
	return dag
		.repositoryLinting()
}

Types

RepositoryLinting 🔗

lintYaml() 🔗

LintYAML lints YAML files in the provided directory

Return Type
File !
Arguments
NameTypeDefault ValueDescription
configPathString ".yamllint"No description provided
outputFileString "yamllint-findings.txt"No description provided
srcDirectory !-No description provided
Example
dagger -m github.com/stuttgart-things/blueprints/repository-linting@22419b8854615da3a92961439f49c00e4f21e3ba call \
 lint-yaml --src DIR_PATH
func (m *MyModule) Example(src *dagger.Directory) *dagger.File  {
	return dag.
			RepositoryLinting().
			LintYaml(src)
}
@function
def example(src: dagger.Directory) -> dagger.File:
	return (
		dag.repository_linting()
		.lint_yaml(src)
	)
@func()
example(src: Directory): File {
	return dag
		.repositoryLinting()
		.lintYaml(src)
}

analyzeReportAndCreateIssue() 🔗

ANALYZE A LINTING REPORT FILE WITH AI AND CREATE A GITHUB ISSUE

Return Type
String !
Arguments
NameTypeDefault ValueDescription
reportFileFile !-No description provided
repositoryString !-GitHub configuration
refString "main"Ref/Branch to checkout - If not specified, defaults to "main"
tokenSecret !-No description provided
labelString -No description provided
assignees[String ! ] -No description provided
modelString !-No description provided
Example
dagger -m github.com/stuttgart-things/blueprints/repository-linting@22419b8854615da3a92961439f49c00e4f21e3ba call \
 analyze-report-and-create-issue --report-file file:path --repository string --token env:MYSECRET --model string
func (m *MyModule) Example(ctx context.Context, reportFile *dagger.File, repository string, token *dagger.Secret, model string) string  {
	return dag.
			RepositoryLinting().
			AnalyzeReportAndCreateIssue(ctx, reportFile, repository, token, model)
}
@function
async def example(report_file: dagger.File, repository: str, token: dagger.Secret, model: str) -> str:
	return await (
		dag.repository_linting()
		.analyze_report_and_create_issue(report_file, repository, token, model)
	)
@func()
async example(reportFile: File, repository: string, token: Secret, model: string): Promise<string> {
	return dag
		.repositoryLinting()
		.analyzeReportAndCreateIssue(reportFile, repository, token, model)
}

analyzeReport() 🔗

ANALYZE A LINTING REPORT FILE WITH AI AND RETURN A TEXT FILE WITH THE ANALYSIS

Return Type
File !
Arguments
NameTypeDefault ValueDescription
reportFileFile !-No description provided
outputFileString "ai-analysis.txt"No description provided
modelString !-No description provided
Example
dagger -m github.com/stuttgart-things/blueprints/repository-linting@22419b8854615da3a92961439f49c00e4f21e3ba call \
 analyze-report --report-file file:path --model string
func (m *MyModule) Example(reportFile *dagger.File, model string) *dagger.File  {
	return dag.
			RepositoryLinting().
			AnalyzeReport(reportFile, model)
}
@function
def example(report_file: dagger.File, model: str) -> dagger.File:
	return (
		dag.repository_linting()
		.analyze_report(report_file, model)
	)
@func()
example(reportFile: File, model: string): File {
	return dag
		.repositoryLinting()
		.analyzeReport(reportFile, model)
}

createGithubIssue() 🔗

CreateGithubIssue creates a GitHub issue for the linting findings

Return Type
String !
Arguments
NameTypeDefault ValueDescription
repositoryString !-Repository in format "owner/repo"
refString "main"Ref/Branch to checkout - If not specified, defaults to "main"
titleString !-No description provided
bodyString !-No description provided
labelString -No description provided
assignees[String ! ] -No description provided
tokenSecret !-GitHub token for authentication
Example
dagger -m github.com/stuttgart-things/blueprints/repository-linting@22419b8854615da3a92961439f49c00e4f21e3ba call \
 create-github-issue --repository string --title string --body string --token env:MYSECRET
func (m *MyModule) Example(ctx context.Context, repository string, title string, body string, token *dagger.Secret) string  {
	return dag.
			RepositoryLinting().
			CreateGithubIssue(ctx, repository, title, body, token)
}
@function
async def example(repository: str, title: str, body: str, token: dagger.Secret) -> str:
	return await (
		dag.repository_linting()
		.create_github_issue(repository, title, body, token)
	)
@func()
async example(repository: string, title: string, body: string, token: Secret): Promise<string> {
	return dag
		.repositoryLinting()
		.createGithubIssue(repository, title, body, token)
}

createIssue() 🔗

CREATE A GITHUB ISSUE WITH AI-ENHANCED FORMATTING

Return Type
String !
Arguments
NameTypeDefault ValueDescription
contentString !-User's issue description
repositoryString !-GitHub configuration
refString "main"Ref/Branch to checkout - If not specified, defaults to "main"
tokenSecret !-No description provided
labelString -No description provided
assignees[String ! ] -No description provided
modelString !-No description provided
Example
dagger -m github.com/stuttgart-things/blueprints/repository-linting@22419b8854615da3a92961439f49c00e4f21e3ba call \
 create-issue --content string --repository string --token env:MYSECRET --model string
func (m *MyModule) Example(ctx context.Context, content string, repository string, token *dagger.Secret, model string) string  {
	return dag.
			RepositoryLinting().
			CreateIssue(ctx, content, repository, token, model)
}
@function
async def example(content: str, repository: str, token: dagger.Secret, model: str) -> str:
	return await (
		dag.repository_linting()
		.create_issue(content, repository, token, model)
	)
@func()
async example(content: string, repository: string, token: Secret, model: string): Promise<string> {
	return dag
		.repositoryLinting()
		.createIssue(content, repository, token, model)
}

validateMultipleTechnologies() 🔗

Return Type
File !
Arguments
NameTypeDefault ValueDescription
enableYamlBoolean trueNo description provided
yamlConfigPathString ".yamllint"No description provided
yamlOutputFileString "yamllint-findings.txt"No description provided
enableMarkdownBoolean trueNo description provided
markdownConfigPathString ".mdlrc"No description provided
markdownOutputFileString "markdown-findings.txt"No description provided
mergedOutputFileString "all-findings.txt"No description provided
srcDirectory !-No description provided
Example
dagger -m github.com/stuttgart-things/blueprints/repository-linting@22419b8854615da3a92961439f49c00e4f21e3ba call \
 validate-multiple-technologies --src DIR_PATH
func (m *MyModule) Example(src *dagger.Directory) *dagger.File  {
	return dag.
			RepositoryLinting().
			ValidateMultipleTechnologies(src)
}
@function
def example(src: dagger.Directory) -> dagger.File:
	return (
		dag.repository_linting()
		.validate_multiple_technologies(src)
	)
@func()
example(src: Directory): File {
	return dag
		.repositoryLinting()
		.validateMultipleTechnologies(src)
}

lintMarkdown() 🔗

LintYAML lints YAML files in the provided directory

Return Type
File !
Arguments
NameTypeDefault ValueDescription
configPathString ".mdlrc"No description provided
outputFileString "markdown-findings.txt"No description provided
srcDirectory !-No description provided
Example
dagger -m github.com/stuttgart-things/blueprints/repository-linting@22419b8854615da3a92961439f49c00e4f21e3ba call \
 lint-markdown --src DIR_PATH
func (m *MyModule) Example(src *dagger.Directory) *dagger.File  {
	return dag.
			RepositoryLinting().
			LintMarkdown(src)
}
@function
def example(src: dagger.Directory) -> dagger.File:
	return (
		dag.repository_linting()
		.lint_markdown(src)
	)
@func()
example(src: Directory): File {
	return dag
		.repositoryLinting()
		.lintMarkdown(src)
}