feat(compose): add compose lint command#2124
Draft
simple-agent-manager[bot] wants to merge 3 commits into
Draft
Conversation
…ints - Remove FixupServices dependency — lint now runs ValidateProject and ValidateServiceDockerfiles directly without needing a provider - Aggregate all validation errors instead of early-returning on first phase - Remove "suggest 512M" from memory reservation warning — we don't know what the user's service needs - Revert healthcheck warning to original (no curl suggestion — image may not have curl) - Revert golden files that only had memory/healthcheck hint changes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add `defang compose lint --fix` to apply safe mechanical fixes and write the result back to the compose file. Fixes include: - Port mode assignment (ingress/host based on protocol/image) - Limits-to-reservations copy - Restart policy normalization - Unsupported directive removal (dns, devices, etc.) This follows the eslint `--fix` pattern: lint validates, --fix applies deterministic corrections before validating. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
defang compose lintcommand for offline Compose validationTests
/usr/local/go/bin/go test -short ./pkg/cli/compose/.../usr/local/go/bin/go test -short ./cmd/cli/commandPATH=/tmp/gobin:/usr/local/go/bin:$PATH make test GO-VERSION=1.25.5 GO-NO-DEP-GO=1Review: @raphaeltm