nix-community / nixpkgs-fmt

Nix code formatter for nixpkgs [maintainer=@zimbatm]
https://nix-community.github.io/nixpkgs-fmt/
Apache License 2.0
581 stars 34 forks source link

think about how to integrate with nixpkgs #56

Open zimbatm opened 5 years ago

zimbatm commented 5 years ago

https://github.com/nrwl/precise-commits#why-precise-commits looks interesting for a gradual transition

zimbatm commented 5 years ago

This is going to be solved by adding nixpkgs-fmt as a pre-commit hook to nixpkgs.

Rizary commented 4 years ago

@zimbatm can we start piece by piece? LIke based on each folder and then make pull Request?

It is because we need to test our nixpkgs-fmt again master branch everytime we have new release. And from what I see, we have like 11198/17542 result of formatting. I wonder if we make PR piece by piece, so the result number will be lower because te formatter will skipped the already corrected format.

what do you think?

zimbatm commented 4 years ago

I think the next step would be to open a RFC to get more community feedback.

  1. Release rnix-fmt
  2. Get it integrated in nixpkgs somehow, either through GitHub Actions or Ofborg.
  3. Start by only formatting the lib/ folder, then gradually all of nixpkgs.

Ideally, the formatting would only be enforced on files that have been changed on a PR so that the process is gradual.

Rizary commented 4 years ago

Noted, agree about where to start formatting.