Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easy GitHub Actions integration #180

Closed
infinisil opened this issue Apr 2, 2024 · 3 comments
Closed

Easy GitHub Actions integration #180

infinisil opened this issue Apr 2, 2024 · 3 comments

Comments

@infinisil
Copy link
Member

There should be some way for people to easily start enforcing official nixfmt formatting on their GitHub repos. A GitHub Action workflow would be great for that.

See NixOS/nixpkgs#299578 (comment) for more context

@gabyx
Copy link

gabyx commented Apr 2, 2024

Although Github actions are a good first solution, it would be nice to just have a nix run nixfmt#format <git-diff-args> or something along these lines, so that other people not using Github Actions also can use it directly in a Nixfied container.
If I would do this, I would directly head for a nix run ??? main...pr-branch thing and then add the Github Action which could only be (not sure) wrapping this nix call. So everybody with a CI, or a local workflow can just do that and it works.

The --check option would just do the thing in a temp. folder and report if diffs happened or not.

@infinisil
Copy link
Member Author

Duplicate of #76

@infinisil infinisil marked this as a duplicate of #76 Apr 2, 2024
@infinisil infinisil closed this as not planned Won't fix, can't repro, duplicate, stale Apr 2, 2024
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/formatting-team-meeting-2024-04-02/42658/1

@infinisil infinisil moved this from Todo to Done in Nix formatting May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

3 participants