Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce 'pretty' indentation 4=>2 #523

Merged
merged 1 commit into from
Apr 24, 2023
Merged

Reduce 'pretty' indentation 4=>2 #523

merged 1 commit into from
Apr 24, 2023

Conversation

jobarr-amzn
Copy link
Contributor

Issue #, if available: None.

Description of changes: This is the same indentation that jq uses by default for prettifying JSON, which makes like-for-like comparisons easiest. An indentation level of 4 also gets deep twice as fast as 2.

Please feel free to discard this pull request if it's unwanted, consider it opening the conversation of "what kind of indentation should we use?"

I intend to add an --indent option such as the one that jq supports to ion-cli, but I am here moving the default for pretty.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This is the same indentation that `jq` uses by default for prettifying
JSON, which makes like-for-like comparisons easiest.
An indentation level of 4 also gets deep twice as fast as 2.
@codecov
Copy link

codecov bot commented Apr 24, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (3e34699) 88.90% compared to head (006575a) 88.90%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #523   +/-   ##
=======================================
  Coverage   88.90%   88.90%           
=======================================
  Files          81       81           
  Lines       12885    12885           
=======================================
  Hits        11455    11455           
  Misses       1430     1430           
Impacted Files Coverage Δ
src/text/raw_text_writer.rs 96.75% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@popematt popematt left a comment

Choose a reason for hiding this comment

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

I am in favor, especially since you're planning to add --indent. Is it difficult to add the indentation config for ion-rust in this PR?

@almann almann merged commit d87a7d3 into main Apr 24, 2023
9 checks passed
@almann almann deleted the pretty-indent branch May 18, 2023 19:06
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.

None yet

4 participants