workflows/editorconfig: drop and move to treefmt#405684
Merged
Mic92 merged 2 commits intoNixOS:masterfrom May 10, 2025
Merged
Conversation
We already have treefmt running for nixfmt, so it's easy to just add another formatter to it. This gives a much better UX, because all formatting errors are reported through the same channel. It also saves us one CI job, which takes most of the time to just set up the machine, clone the repo and download Nix - while doing a minimum of actual work. Total execution time for treefmt is ~10% slower: - 38s only nixfmt - 43s nixfmt + editorconfig-checker
d2cbac7 to
ba4fe10
Compare
Same reasoning as the commit before, but keep-sorted has even less overhead than editorconfig-checker. Benchmark has it at 1 second per run.
Contributor
Author
|
I added a second commit to do the same for the
|
1 task
philiptaron
approved these changes
May 9, 2025
Contributor
philiptaron
left a comment
There was a problem hiding this comment.
Great find and good fix, @wolfgangwalther.
Mic92
approved these changes
May 9, 2025
zowoq
approved these changes
May 9, 2025
Contributor
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release-24.11
git worktree add -d .worktree/backport-405684-to-release-24.11 origin/release-24.11
cd .worktree/backport-405684-to-release-24.11
git switch --create backport-405684-to-release-24.11
git cherry-pick -x ba4fe10465e752d701e44bb8c5a8fc670b3845a1 1cb7a384e022733ba8c1387a9aef9ad382c86394 |
1 task
This was referenced May 11, 2025
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.
We already have
treefmtrunning fornixfmt, so it's easy to just add another formatter to it. This gives a much better UX, because all formatting errors are reported through the same channel.It also saves us one CI job, which takes most of the time to just set up the machine, clone the repo and download Nix - while doing a minimum of actual work.
Total execution time for treefmt is ~10% slower:
Also, because we're not checking only changed files anymore, we're not going to have editorconfig failures sneak in over time as they did before.
Some raw numbers (AMD Ryzen 9 3950X 16-Core):
Actions Performance Metrics (avg run time):
editorconfig-v2.yml: 54scheck-nix-format.yml: 2m 24sThis will most likely have minimal effect on the runtime of the
check-formatworkflow, but save the wholeeditorconfig-v2workflow.Things done
Tested locally.
Add a 👍 reaction to pull requests you find important.