Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces an inlining feature for the JSON pretty printer with a configurable --no-inline flag. The implementation refactors the pretty printing logic to support both inline and non-inline formatting modes.
- Adds a new
--no-inlineCLI flag to disable array and object inlining - Refactors the pretty printing logic to support conditional inlining with separate functions for different data structure types
- Introduces comprehensive test coverage for the new inlining functionality
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| main.go | Adds --no-inline flag parsing and passes inline configuration to the engine |
| internal/engine/engine.go | Updates Start function signature to accept inline configuration parameter |
| internal/engine/engine_test.go | Updates test calls to include the new withInline parameter |
| internal/pretty/pretty_print.go | Refactors printing logic with conditional inlining support and helper functions |
| internal/pretty/is_inlineable.go | Removes old inlining logic (deleted file) |
| internal/pretty/inlineable.go | Implements new inlining detection functions for different data structure types |
| internal/pretty/pretty_print_test.go | Adds comprehensive test coverage for pretty printing with inline variations |
| internal/pretty/inlineable_test.go | Adds test coverage for inlineable detection functions |
| internal/complete/complete.go | Adds --no-inline flag to completion system |
| help.go | Documents the new --no-inline flag in help text |
Comments suppressed due to low confidence (1)
internal/pretty/inlineable_test.go:321
- [nitpick] The test name has an inconsistent prefix "array - " that doesn't match the pattern used in other test cases. Consider renaming to "array of objects with mixed value types" for consistency.
name: "array - array of objects with mixed value types",
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.
No description provided.