Repository navigation
Tidy - #1561
Merged
Merged
Tidy#1561
Conversation
I created a file `branches.txt` by listing all branches used by open
pull requests in zonemaster-engine, and then I ran the following
command. I ran it twice, because perltidy is not entirely idempotent.
(
cat branches.txt | while read branch
do
git show "$branch" --name-only --format=
done | sort -u
git ls-files
) | sort | uniq -c | sed -E '/^ *1 /!d; s/.* //; /[.](pm|pl|t)$/!d' | xargs perltidy -b
Make all multi-line lists get trailing commas, and any trailing commas on single line lists are removed.
mattias-p
requested review from
MichaelTimbert,
marc-vanderwal,
matsduf,
tgreenx and
tolvmannen
October 8, 2026 13:14
Contributor
|
It looks OK. I could approve unless someone finds an issue. |
tgreenx
approved these changes
Oct 13, 2026
tgreenx
left a comment
Contributor
There was a problem hiding this comment.
Looks fine at a glance. I think this PR should be merged asap though so that it conflicts as little as possible with current and upcoming PRs.
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.
Purpose
perltidyacross the repository, with some exclusions and some tweaks.Context
.pl,.pmand.tfile that was not touched by a PR that was open at the time.perltidyusing the.perltidyrcalready present in the repository.Changes
First commit:
perltidywas applied across the repository, with some exclusions.I created a file
branches.txtby listing all branches used by open pull requests in zonemaster-engine, and then I ran the following command. I ran it twice because perltidy isn't entirely idempotent.( cat branches.txt | while read branch do git show "$branch" --name-only --format= done | sort -u git ls-files ) | sort | uniq -c | sed -E '/^ *1 /!d; s/.* //; /[.](pm|pl|t)$/!d' | xargs perltidy -bSecond commit: Some comments were added to the perltidy configuration to make it a bit less cryptic.
Third commit: Format trailing commas according to my personal preferences. It should make git diffs slightly smaller in some cases.
Fourth commit: Make
perltidyiterate application of its profile to come closer to idempotency.Reviewing
.perltidyrcconfiguration.How to test this PR
Unit tests should pass.