Repository navigation
cli: add 'komposer check' for scripts and CI - #7
Merged
Merged
Conversation
komposer check [flags] [file] runs the editor's three validation layers without starting the TUI: Errors komposer's own semantic checks Warnings security / reliability advisories Compose specification the official JSON schema - file defaults to the first of compose.yaml, compose.yml, docker-compose.yaml, docker-compose.yml (Docker Compose's own order) - --strict makes warnings fail the run - --format json emits a stable machine-readable report (empty lists are [], never null) - exit codes: 0 ok, 1 problems found, 2 bad arguments / unreadable file - flags may come before or after the file name - text output is colored through lipgloss only on a color-capable terminal (NO_COLOR honored); piped output is plain Also adds 'komposer --help' / 'help' and documents the command in the README. The logic lives in internal/check so it is testable without the TUI; main.go only dispatches and supplies the styler.
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.
komposer check [flags] [file] runs the editor's three validation layers without starting the TUI:
Errors komposer's own semantic checks
Warnings security / reliability advisories
Compose specification the official JSON schema
Also adds 'komposer --help' / 'help' and documents the command in the README. The logic lives in internal/check so it is testable without the TUI; main.go only dispatches and supplies the styler.
What changed
How to test
Checklist
make lint/npm run lintpassesmake test/npm testpasses