ci/treefmt: add markdown-code-runner#427460
Conversation
|
You can now enjoy a tag for And the PR that goes with it: #427516 |
e047389 to
2957568
Compare
|
Converted to draft because of the Formatting is done in 3 steps:
The first commit looks like I would do it, once the new Ready for review, but not for merge. |
|
To avoid too much work for you in case of conflict(s), I think the commit where you reformat everything should be the last of the list, so that you can easily drop it and recreate it in case of conflict(s). |
Just to comment on this with my formatting team hat on: Trailing comments are moved to their own line in some scenarios In the common example of a comment trailing a binding, it probably is more likely that the comment relates to the variable binding, but in other scenarios that may not be the case. In most scenarios we'd anticipate the author noticing the auto-formatting not matching their desired layout and manually tweaking it, especially if they have configured treefmt-on-save in their editor. Perhaps it's worth discussing this in an issue on the nixfmt repo though, so that we can go through some concrete examples and/or get insight from other formatting team members more familiar with the actual implementation. Maybe there is a strong argument for assuming the comment should usually go above instead of below? |
This comment was marked as off-topic.
This comment was marked as off-topic.
I'd argue:
There are probably edge-cases where just moving the comment to the next line is the right thing... but my guess is that the majority of cases is better handled by moving them to the previous line instead. |
923e72d to
260a657
Compare
|
(Note that the ✅ plus comments means that following the suggestion is extremely optional.) |
This was run as a test in `doc/tests/check-nix-code-blocks.nix` before, but its DX can be improved: By including it in `treefmt` we get better error reporting and auto-fixing, as well as running it on *all* markdown files (including READMEs etc.) for free.
260a657 to
a7b3b25
Compare
|
Strange CI failure here. https://github.com/NixOS/nixpkgs/actions/runs/16754575116/job/47433571147?pr=427460
That commit is part of #430904, and CI never ran against that specific commit because it was pushed together with a later commit. I'm not sure why this PR's eval is looking for a workflow run for an entirely unrelated commit, though? |
|
We just were impacted by https://www.githubstatus.com/incidents/6swp0zf7lk8h @MattSturgeon |
|
Strange failure mode for our Do you have permission to restart the workflow run? |
|
I do have permissions, but since the failures were so widespread, I expect a rebase would be best to reset it all. |
|
We can re-trigger CI without a rebase by close+open. |
This comment was marked as resolved.
This comment was marked as resolved.
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/formatting-team-meeting-2025-08-05/67630/1 |
This was run as a test in
doc/tests/check-nix-code-blocks.nixbefore, but its DX can be improved: By including it intreefmtwe get better error reporting and auto-fixing, as well as running it on all markdown files (including READMEs etc.) for free.This will need an update of the pin, which needs #427437.
Things done
Add a 👍 reaction to pull requests you find important.