-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
chore(housekeeping): Normalize how config files filter out unwanted lines #2619
Merged
polarathene
merged 10 commits into
docker-mailserver:master
from
polarathene:chore/housekeeping-parsing-functions
Jun 6, 2022
Merged
chore(housekeeping): Normalize how config files filter out unwanted lines #2619
polarathene
merged 10 commits into
docker-mailserver:master
from
polarathene:chore/housekeeping-parsing-functions
Jun 6, 2022
Conversation
This file contains 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
polarathene
added
area/scripts
kind/improvement
Improve an existing feature, configuration file or the documentation
pr/waiting for other PR to get merged
This PR is waiting for another / other PR(s) to get merged
labels
Jun 5, 2022
5 tasks
Prior PR feedback suggested a better helper method name.
No longer serving a purpose with more appropriate filter method for pre-processing the entire config file.
polarathene
force-pushed
the
chore/housekeeping-parsing-functions
branch
from
June 5, 2022 23:33
07582bb
to
3b66022
Compare
polarathene
removed
the
pr/waiting for other PR to get merged
This PR is waiting for another / other PR(s) to get merged
label
Jun 5, 2022
polarathene
requested review from
georglauterbach and
casperklein
and removed request for
georglauterbach
June 5, 2022 23:39
This comment was marked as resolved.
This comment was marked as resolved.
casperklein
approved these changes
Jun 6, 2022
georglauterbach
approved these changes
Jun 6, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Description
We have used various ways to filter out unwanted lines (empty, white-space only, comments) from configs when reading them to iterate through. In some cases, we had not filtered for all kinds of unwanted lines, or did not filter at all (even though we probably should have).
This PR has normalized that approach to call a helper method instead (added in #2617), with a common approach to call the filter method applied:
_get_valid_lines_from_file()
(renamed in this PR from earlier_filter_to_valid_lines()
due to feedback in #2617 ).helpers/relay.sh
had a loop that only seems to strip out the unwanted lines for the target config. This doesn't seem necessary and could probably just be acp
instead? I collapsed that loop to call the filtering method and just write the output of that instead.helpers/utils.sh:_is_comment()
has been removed, as onlyrelay.sh
was using it and it no longer seems to serve any purpose.Relevant history
Looks like initial filtering to avoid issues was introduced via this PR in May 2020.
Type of change
Checklist: