Conversation
Add CLI option to suppress object comment headers (-- Name: ...; Type: ...) in dump output while retaining the dump header. This enables users to get pure DDL output without post-processing. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a --no-comments flag to the dump command that suppresses object comment headers (e.g., -- Name: users; Type: TABLE; Schema: -; Owner: -) in dump output while retaining the dump header. This addresses issue #262 by providing users with pure DDL output without requiring post-processing.
Changes:
- Added
--no-commentsCLI flag to the dump command - Modified DumpFormatter to conditionally suppress object comment headers based on the flag
- Updated all tests to accommodate the new parameter in DumpFormatter constructor
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| internal/dump/formatter.go | Added noComments field to DumpFormatter and conditional logic to suppress object comment headers in both single-file and multi-file formatting |
| cmd/dump/dump.go | Added --no-comments flag definition and wired it through DumpConfig to the formatter |
| cmd/dump/multifile_test.go | Updated NewDumpFormatter calls with the new noComments parameter (false) |
| cmd/dump/dump_test.go | Added flag definition test and comprehensive behavior tests for single-file mode with and without the flag |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Fix #262
Add CLI option to suppress object comment headers (-- Name: ...; Type: ...) in dump output while retaining the dump header. This enables users to get pure DDL output without post-processing.