-
Notifications
You must be signed in to change notification settings - Fork 177
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
Remove empty sections after last setting is removed #199
Conversation
| uncom = ment | ||
|
|
||
| -nonstandard- | ||
| shoes = purple |
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.
I moved these lines up to verify that the [section:sub] is not affected by removing a section.
b6587ce
to
70b945a
Compare
Empty sections hanging around are not useful, so if the last line in a section is removed then remove the section. If the section still has comments, then just leave it be. This does not add the ability to remove sections that do not have settings to begin with; only allows cleaning a file as puppet makes changes to it.
70b945a
to
2027a0b
Compare
| [section:sub] | ||
| subby=bar | ||
| #another comment | ||
| ; yet another comment | ||
|
|
||
| -nonstandard- |
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.
This section is now being removed, as it is empty after the setting is removed.
|
👍 thanks for this useful feature |
|
thanks! this will be very useful for https://review.openstack.org/#/c/280351/8/manifests/mon.pp |
|
👍 |
Remove empty sections after last setting is removed
|
@bmjen thanks a lot for your eyes on it! Thanks a lot for your help |
Empty sections hanging around are not useful, so if the last line in a
section is removed then remove the section. If the section still has
comments, then just leave it be.
This does not add the ability to remove sections that do not have
settings to begin with; only allows cleaning a file as puppet makes
changes to it.