Skip to content

Inlining#359

Merged
antonmedv merged 18 commits intomasterfrom
inlining
Aug 2, 2025
Merged

Inlining#359
antonmedv merged 18 commits intomasterfrom
inlining

Conversation

@antonmedv
Copy link
Copy Markdown
Owner

No description provided.

@antonmedv antonmedv requested a review from Copilot August 1, 2025 17:45

This comment was marked as outdated.

@antonmedv antonmedv requested a review from Copilot August 2, 2025 11:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-inline CLI 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",

@antonmedv antonmedv merged commit cf61836 into master Aug 2, 2025
3 checks passed
@antonmedv antonmedv deleted the inlining branch August 2, 2025 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants