Update hadolint to v2.15.1 - #4802
Conversation
The pinned v1.17.2 (2019) rejects the HEALTHCHECK --start-interval flag (supported by hadolint since v2.14.0, Docker Engine since 25.0) with a parse error. Extend the ignore list with the rules the new version reports across existing Dockerfiles, all style-level: DL3025 (shell-form HEALTHCHECK CMDs, needed for pipes), DL3029 (--platform in FROM, intentional in silabs-multiprotocol), DL3059/DL3066 (info), SC3010. Verified all 26 Dockerfiles lint clean with v2.15.1 and this config. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe lint workflow now uses Hadolint v2.15.1. The Hadolint configuration ignores five additional rules: ChangesHadolint lint policy
Estimated code review effort: 2 (Simple) | ~5 minutes Merge Risk: 🔵 Low · up to The lint configuration now applies these rule exceptions to all current and future Dockerfiles, which could unintentionally suppress findings in newly added files. The PR is mergeable with explicit owner awareness of this repository-wide scope. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.) ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
sairon
left a comment
There was a problem hiding this comment.
Seems that the official hadolint/hadolint-action supports glob patterns and the output looks good: hadolint/hadolint-action#3 (comment)
Maybe we could do that instead of spinning up a Docker container for each Dockerfile? The adedd benefit is that Dependabot would keep hadolint up to date then.
|
Good idea — implemented in #4804, which uses |
|
Okay, let's close this in favor of #4804. |
What this PR changes
.hadolint.yamlwith the style-level rules the new version reports across existing Dockerfiles:DL3025(shell-form HEALTHCHECK/CMD — required for the pipednc | grephealth probes),DL3029(--platformin FROM — intentional in silabs-multiprotocol's multi-stage build),DL3059/DL3066(info-level),SC3010.Why
v1.17.2 predates Docker Engine 25's
HEALTHCHECK --start-intervalflag and fails with a parse error (invalid flag: --start-interval); hadolint supports it since v2.14.0 (hadolint/hadolint#978). #4800 and #4801 use--start-intervalto leave the "Starting" state faster and need this to pass lint.Verified locally: all 26 Dockerfiles in the repo lint clean with v2.15.1 and the updated config, including the two PR branches using
--start-interval.🤖 Generated with Claude Code
Summary by CodeRabbit