-
Notifications
You must be signed in to change notification settings - Fork 31
Better padding with init command sample files. #94
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
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 |
|
|
||
| func formatArrayObject(obj string) string { | ||
|
|
||
| func formatObject(obj string, isArray bool) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.