Skip to content

flake: use the same treefmt package throughout #3333

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

Merged
merged 3 commits into from
May 16, 2025

Conversation

MattSturgeon
Copy link
Member

  • flake: use pre-configured treefmt package in git-hooks
  • flake/devshell: run treefmt directly in format command
  • flake/devshell: add treefmt to shell

Avoid running nix fmt within the shell; we already have evaluated and built our wrapped treefmt, so use that instead of re-evaluating the flake by calling nix fmt.

This is much faster than running `nix fmt`.

Running treefmt directly will use the treefmt installed in the current
shell. Running `nix fmt` will first re-evaluate the flake.
@MattSturgeon

This comment was marked as outdated.

@khaneliman

This comment was marked as resolved.

@nix-community nix-community deleted a comment from mergify bot May 16, 2025

This comment was marked as resolved.

Copy link
Contributor

mergify bot commented May 16, 2025

This pull request, with head sha 2628efee7111398e3ba1e7ba3cff00f580fe554b, has been successfully merged with fast-forward by Mergify.

This pull request will be automatically closed by GitHub.

As soon as GitHub detects that the sha 2628efee7111398e3ba1e7ba3cff00f580fe554b is part of the main branch, it will mark this pull request as merged.

It is possible for this pull request to remain open if this detection does not happen, this usually happens when a force-push is done on this branch treefmt/shell, this means GitHub will fail to detect the merge.

@mergify mergify bot merged commit 2628efe into nix-community:main May 16, 2025
4 checks passed
@mergify mergify bot temporarily deployed to github-pages May 16, 2025 22:52 Inactive
@MattSturgeon MattSturgeon deleted the treefmt/shell branch May 16, 2025 23:05
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.

2 participants