Skip to content

Tidy - #1561

Merged
mattias-p merged 4 commits into
zonemaster:developfrom
mattias-p:tidy
Oct 14, 2026
Merged

Tidy#1561
mattias-p merged 4 commits into
zonemaster:developfrom
mattias-p:tidy

Conversation

@mattias-p

@mattias-p mattias-p commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Purpose

  • This PR applies perltidy across the repository, with some exclusions and some tweaks.

Context

  • This PR updates every .pl, .pm and .t file that was not touched by a PR that was open at the time.
  • The files tidied here make up 86% of the tidiable lines in zonemaster-engine.
  • All edits were made by perltidy using the .perltidyrc already present in the repository.

Changes

  • First commit: perltidy was applied across the repository, with some exclusions.

    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 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 -b
  • Second 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 perltidy iterate application of its profile to come closer to idempotency.

Reviewing

  • Review the result of tidying.
  • Propose changes to the .perltidyrc configuration.

How to test this PR

Unit tests should pass.

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.
@matsduf

matsduf commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

It looks OK. I could approve unless someone finds an issue.

@matsduf
matsduf requested a review from MarkusVidefors October 8, 2026 13:22

@tgreenx tgreenx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@tgreenx tgreenx added V-Patch Versioning: The change gives an update of patch in version. RC-None Release category: Not to be included in Changes file. labels Oct 13, 2026

@matsduf matsduf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me too.

@mattias-p
mattias-p merged commit 3829f61 into zonemaster:develop Oct 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RC-None Release category: Not to be included in Changes file. V-Patch Versioning: The change gives an update of patch in version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants