Skip to content

chore: add formatter#139

Merged
nvmd merged 4 commits into
nvmd:developfrom
limwa:feat/formatter
Apr 30, 2026
Merged

chore: add formatter#139
nvmd merged 4 commits into
nvmd:developfrom
limwa:feat/formatter

Conversation

@limwa
Copy link
Copy Markdown
Contributor

@limwa limwa commented Feb 18, 2026

Hi, I noticed that the project uses nixpkgs-fmt in its devShells, but doesn't set a formatter in the flake. I thought it could be useful to set it, and while I'm at it, I also decided to add an action that checks the formatting of all files.

  1. Adds nixpkgs-fmt as the formatter in the flake. Makes it so that nix fmt . automatically invokes nixpkgs-fmt.
  2. Adds a GH action that checks the formatting of all files in the project on every PR and push to develop or main.
  3. Formats all unformatted files to comply with the requirements imposed by the action.

@limwa
Copy link
Copy Markdown
Contributor Author

limwa commented Feb 18, 2026

I just noticed that nixpkgs-fmt has been archived (https://github.com/nix-community/nixpkgs-fmt), so I replaced it with nixfmt. nixfmt-tree is the recommended way of invoking nixfmt for an entire project, it seems.

@doronbehar
Copy link
Copy Markdown

@nvmd could we please make a bit of progress regarding the formatting? This PR, and:

All try to format the project and it is a mess. I'm trying to merge multiple pull requests locally to test them and help with the project in general but it becomes too hard with all the merge conflicts related to formatting.

@limwa
Copy link
Copy Markdown
Contributor Author

limwa commented Apr 30, 2026

I was looking at the other PRs you mentioned and saw that you suggested adding a .git-blame-ignore-revs file like in nixpkgs. I can do that here too later today!

@limwa
Copy link
Copy Markdown
Contributor Author

limwa commented Apr 30, 2026

I've added the .git-blame-ignore-revs file and I've also rebased the PR to resolve the merge conflicts.

@nvmd
Copy link
Copy Markdown
Owner

nvmd commented Apr 30, 2026

Hi @doronbehar thanks for bringing this issue up. The formatting does seem like a hot topic indeed.

However, regardless of how hot it is, I can't for the sake of further maintainability merge it together with some irrelevant changes. The examples you include here: mix formatting with the other changes on the commit level, effectively hiding them; formatting being a part of a PR otherwise needed review feature by feature. This feedback was provided to the authors of the corresponding PRs.

That said, I don't quite understand the pressure you're trying to put on me personally. Though I guess it's done with good intentions and your help with the project would be greatly appreciated in any case.

@nvmd
Copy link
Copy Markdown
Owner

nvmd commented Apr 30, 2026

I've added the .git-blame-ignore-revs file and I've also rebased the PR to resolve the merge conflicts.

Thanks @limwa! I did completely forget about this feature! And this PR being the cleanest of the formatting ones, sorry! No any more questions from my side.

@nvmd nvmd merged commit e933743 into nvmd:develop Apr 30, 2026
1 check passed
@doronbehar
Copy link
Copy Markdown

Thanks @nvmd :). Hope to be able to further help soon with testings.

@limwa limwa deleted the feat/formatter branch April 30, 2026 16:08
@nvmd nvmd mentioned this pull request May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants