Skip to content

feat(hadolint): add native Rust Dockerfile linter with GPL-3.0 license#221

Merged
Alex793x merged 1 commit intomainfrom
develop
Dec 21, 2025
Merged

feat(hadolint): add native Rust Dockerfile linter with GPL-3.0 license#221
Alex793x merged 1 commit intomainfrom
develop

Conversation

@Alex793x
Copy link
Copy Markdown
Contributor

This commit introduces hadolint-rs, a complete Rust translation of the Hadolint Dockerfile linter, along with agent integration and proper GPL-3.0 licensing/attribution.

Hadolint-RS (src/analyzer/hadolint/)

Native Dockerfile linting without external binary dependency:

  • Complete Dockerfile parser with AST representation
  • 70+ lint rules (DL3xxx, DL4xxx series)
  • Pragma support for inline rule ignoring (# hadolint ignore=DL3008)
  • Configurable severity thresholds and rule ignoring
  • Shell command analysis for RUN instructions

Formatters (src/analyzer/hadolint/formatter/)

  • JSON: Machine-readable for CI/CD pipelines
  • SARIF: GitHub Actions Code Scanning integration
  • TTY: Colored terminal output for humans
  • Checkstyle: XML format for Jenkins
  • CodeClimate: NDJSON for GitLab CI
  • GNU: Compiler-style output for editors

Agent Integration (src/agent/tools/hadolint.rs)

AI-optimized tool output with:

  • Priority rankings (critical/high/medium/low)
  • Category classification (security/best-practice/maintainability/performance)
  • Actionable fix recommendations for each rule
  • Quick fixes summary for most important issues
  • Decision context for rapid assessment
  • Documentation links to rule wikis

Agent Display (src/agent/ui/)

Docker-themed visual output:

  • Docker blue color scheme (chore: release v0.4.2 #39 ANSI)
  • Priority-colored indicators (red/orange/yellow/green)
  • Category badges ([SEC], [BP], [DEP], [PERF])
  • Collapsible issue preview with quick fix hints
  • New icons for Docker, lint priorities

License & Attribution

Changed license to GPL-3.0 due to Hadolint derivative work:

  • Updated LICENSE file to GPL-3.0 full text
  • Created THIRD_PARTY_NOTICES.md with full attribution
  • Added attribution header to hadolint/mod.rs
  • Updated README.md with GPL-3.0 badge and attribution section
  • Updated Cargo.toml license field

Other Changes

  • Shell tool: Added async streaming output with tokio::process
  • Agent: Improved tool call handling and context management
  • Removed stray screenshot from analyzer directory

🤖 Generated with Claude Code

This commit introduces hadolint-rs, a complete Rust translation of the
Hadolint Dockerfile linter, along with agent integration and proper
GPL-3.0 licensing/attribution.

## Hadolint-RS (src/analyzer/hadolint/)

Native Dockerfile linting without external binary dependency:
- Complete Dockerfile parser with AST representation
- 70+ lint rules (DL3xxx, DL4xxx series)
- Pragma support for inline rule ignoring (# hadolint ignore=DL3008)
- Configurable severity thresholds and rule ignoring
- Shell command analysis for RUN instructions

### Formatters (src/analyzer/hadolint/formatter/)
- JSON: Machine-readable for CI/CD pipelines
- SARIF: GitHub Actions Code Scanning integration
- TTY: Colored terminal output for humans
- Checkstyle: XML format for Jenkins
- CodeClimate: NDJSON for GitLab CI
- GNU: Compiler-style output for editors

## Agent Integration (src/agent/tools/hadolint.rs)

AI-optimized tool output with:
- Priority rankings (critical/high/medium/low)
- Category classification (security/best-practice/maintainability/performance)
- Actionable fix recommendations for each rule
- Quick fixes summary for most important issues
- Decision context for rapid assessment
- Documentation links to rule wikis

## Agent Display (src/agent/ui/)

Docker-themed visual output:
- Docker blue color scheme (#39 ANSI)
- Priority-colored indicators (red/orange/yellow/green)
- Category badges ([SEC], [BP], [DEP], [PERF])
- Collapsible issue preview with quick fix hints
- New icons for Docker, lint priorities

## License & Attribution

Changed license to GPL-3.0 due to Hadolint derivative work:
- Updated LICENSE file to GPL-3.0 full text
- Created THIRD_PARTY_NOTICES.md with full attribution
- Added attribution header to hadolint/mod.rs
- Updated README.md with GPL-3.0 badge and attribution section
- Updated Cargo.toml license field

## Other Changes

- Shell tool: Added async streaming output with tokio::process
- Agent: Improved tool call handling and context management
- Removed stray screenshot from analyzer directory

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@Alex793x Alex793x merged commit 3e7105d into main Dec 21, 2025
@Alex793x Alex793x mentioned this pull request Dec 21, 2025
Alex793x added a commit that referenced this pull request Mar 28, 2026
feat(hadolint): add native Rust Dockerfile linter with GPL-3.0 license
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant