-
Notifications
You must be signed in to change notification settings - Fork 921
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
Hair trimming in pdnsutil #1 #15039
Hair trimming in pdnsutil #1 #15039
Conversation
This unfortunately removes the "hash-password" easter egg.
Pull Request Test Coverage Report for Build 12788952103Details
💛 - Coveralls |
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.
Very nice to have split the main(). On other binaries we have been tending to explicit short variable names instead of adding a bunch of NOLINT(readability-identifier-length)
(which decreases readability IMO). Otherwise LGTM !
I don't want to rename variables yet in order to make the diff somehow reviewable (if you ignore whitespace changes due to decreased indent). |
I did not know that! I am, however, also not surprised ;) |
do I see correctly that |
This is correct. |
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 have not reviewed very line, but I like the shape of this a lot. Tests still pass, and I tested a few things manually, and that all worked. Let's do it!
Short description
This PR is one first step in the path to make
pdnsutil
code readable and maintainable.Key changes are:
pdnsutil
command is now handled by its own routine, rather than inline inmain
.map
data structure, which allows the nestedif ... else if ... else if ...
spaghetti inmain
to be replaced by afind
and function pointer call.Did you know that
pdnsutil
had two different logic blocks handling thehash-password
command, 600 lines of code apart, with the second one being completely dead code as it would have no chance to run?Checklist
I have: