flake: format the tree with one treefmt

The pre-commit hooks kept their own list of formatters, so nixpkgs-fmt in
a hook and nixfmt in the check disagreed the moment flake-checks moved.
`nix fmt` is now built from the same treefmt module the formatting check
is, and the hook and the Makefile both call it.
This commit is contained in:
Kristoffer Dalby
2026-09-10 05:33:45 +00:00
parent f1186d8e00
commit d59c1ed209
5 changed files with 28 additions and 19 deletions
+5 -5
View File
@@ -50,7 +50,7 @@ test: check-deps $(GO_SOURCES) go.mod go.sum
# Formatting targets
.PHONY: fmt
fmt: fmt-go fmt-mdformat fmt-prettier
fmt: fmt-go fmt-mdformat fmt-tree
.PHONY: fmt-go
fmt-go: check-deps $(GO_SOURCES)
@@ -63,10 +63,10 @@ fmt-mdformat: check-deps
@echo "Formatting documentation..."
mdformat docs/
.PHONY: fmt-prettier
fmt-prettier: check-deps $(PRETTIER_SOURCES)
@echo "Formatting markup and config files..."
prettier --write '**/*.{ts,js,md,yaml,yml,sass,css,scss,html}'
.PHONY: fmt-tree
fmt-tree: check-deps $(PRETTIER_SOURCES)
@echo "Formatting Nix, markup and config files..."
nix fmt
# Linting targets
.PHONY: lint