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.0Entrypoint
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
| Name | Type | Default Value | Description |
|---|---|---|---|
| configPath | String | ".yamllint" | No description provided |
| outputFile | String | "yamllint-findings.txt" | No description provided |
| src | Directory ! | - | No description provided |
Example
dagger -m github.com/stuttgart-things/blueprints/repository-linting@22419b8854615da3a92961439f49c00e4f21e3ba call \
lint-yaml --src DIR_PATHfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| reportFile | File ! | - | No description provided |
| repository | String ! | - | GitHub configuration |
| ref | String | "main" | Ref/Branch to checkout - If not specified, defaults to "main" |
| token | Secret ! | - | No description provided |
| label | String | - | No description provided |
| assignees | [String ! ] | - | No description provided |
| model | String ! | - | 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 stringfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| reportFile | File ! | - | No description provided |
| outputFile | String | "ai-analysis.txt" | No description provided |
| model | String ! | - | No description provided |
Example
dagger -m github.com/stuttgart-things/blueprints/repository-linting@22419b8854615da3a92961439f49c00e4f21e3ba call \
analyze-report --report-file file:path --model stringfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| repository | String ! | - | Repository in format "owner/repo" |
| ref | String | "main" | Ref/Branch to checkout - If not specified, defaults to "main" |
| title | String ! | - | No description provided |
| body | String ! | - | No description provided |
| label | String | - | No description provided |
| assignees | [String ! ] | - | No description provided |
| token | Secret ! | - | 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:MYSECRETfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| content | String ! | - | User's issue description |
| repository | String ! | - | GitHub configuration |
| ref | String | "main" | Ref/Branch to checkout - If not specified, defaults to "main" |
| token | Secret ! | - | No description provided |
| label | String | - | No description provided |
| assignees | [String ! ] | - | No description provided |
| model | String ! | - | 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 stringfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| enableYaml | Boolean | true | No description provided |
| yamlConfigPath | String | ".yamllint" | No description provided |
| yamlOutputFile | String | "yamllint-findings.txt" | No description provided |
| enableMarkdown | Boolean | true | No description provided |
| markdownConfigPath | String | ".mdlrc" | No description provided |
| markdownOutputFile | String | "markdown-findings.txt" | No description provided |
| mergedOutputFile | String | "all-findings.txt" | No description provided |
| src | Directory ! | - | No description provided |
Example
dagger -m github.com/stuttgart-things/blueprints/repository-linting@22419b8854615da3a92961439f49c00e4f21e3ba call \
validate-multiple-technologies --src DIR_PATHfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| configPath | String | ".mdlrc" | No description provided |
| outputFile | String | "markdown-findings.txt" | No description provided |
| src | Directory ! | - | No description provided |
Example
dagger -m github.com/stuttgart-things/blueprints/repository-linting@22419b8854615da3a92961439f49c00e4f21e3ba call \
lint-markdown --src DIR_PATHfunc (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)
}