Skip to content

feat(ansible-lint): group violations by rule with sample limits - #4974

Open
pederbe wants to merge 1 commit into
rtk-ai:developfrom
pederbe:feat/1781-ansible-lint
Open

pederbe wants to merge 1 commit into
rtk-ai:developfrom
pederbe:feat/1781-ansible-lint

Conversation

@pederbe

@pederbe pederbe commented Nov 3, 2026

Copy link
Copy Markdown

Summary

  • Add rtk ansible-lint with violations grouped by rule, three sample locations per rule, omitted counts and full-output recovery.
  • Preserve exit codes, diagnostics and the final Passed/Failed summary. Pass help, version, lists and explicit output formats through unchanged. Keep multiline or unfamiliar reports complete.
  • Register command discovery, hook rewriting and gain tracking.

Closes #1781.

Test plan

  • cargo fmt --all --check && cargo clippy --all-targets && cargo test --all
  • Manual testing: native and wrapped ansible-lint 26.10.1 output matched exit codes and summaries against a local role with 24 violations, including --offline -p and colored output.

@pederbe
pederbe marked this pull request as ready for review November 3, 2026 17:37
@rtk-wshm-sync-bot

Copy link
Copy Markdown

wshm · Automated triage by AI

📊 Automated PR Analysis

✨ Type feature
🟡 Risk medium

Summary

Adds a new rtk ansible-lint subcommand that groups ansible-lint violations by rule, capping sample locations per rule while preserving exit codes, diagnostics, and the final Passed/Failed summary. It parses both default and legacy -p report formats, passes through help/version/list/explicit-format invocations unchanged, and registers the command for discovery, hook rewriting, and gain tracking.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Linked issues: #1781


Analyzed automatically by wshm · This is an automated analysis, not a human review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: rtk ansible-lint wrapper (group violations by rule, cap output)

2 participants