Better padding with init command sample files.#94
Merged
winder merged 2 commits intoalgorand:masterfrom Jun 9, 2023
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #94 +/- ##
==========================================
+ Coverage 67.66% 69.35% +1.69%
==========================================
Files 32 36 +4
Lines 1976 2431 +455
==========================================
+ Hits 1337 1686 +349
- Misses 570 653 +83
- Partials 69 92 +23
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
winder
commented
Jun 9, 2023
|
|
||
| func formatArrayObject(obj string) string { | ||
|
|
||
| func formatObject(obj string, isArray bool) string { |
Contributor
Author
There was a problem hiding this comment.
The main changes is to use this function for each type of configuration. Once that was done, I updated each of the sample files to use consistent padding.
tzaffi
reviewed
Jun 9, 2023
tzaffi
reviewed
Jun 9, 2023
tzaffi
reviewed
Jun 9, 2023
Eric-Warehime
approved these changes
Jun 9, 2023
tzaffi
approved these changes
Jun 9, 2023
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.
Summary
The importer/exporter sample files required proper padding, while the processor samples were required to be un-padded.
With this change all sample files may be un-padded. Any accidental padding will still work, and only causes the config file to look strange rather than resulting in a broken file.
With these changes we also consistently pad with 4 spaces. Before there was a mixture of 2/4 space indents.
Test Plan
Manual testing.