fix(make): find sans résultat bloquait sur stdin

- xargs -0 -r sur toutes les cibles : si find ne retourne rien,
  nixfmt/shfmt lisaient stdin et make fmt/check restait bloqué
  (testé et reproduit avant correction)
- CLAUDE.md : retire la ligne shell.nix (fichier inexistant)
This commit is contained in:
Pierre Martin
2026-09-07 10:41:29 +02:00
parent 4540b3d527
commit 4072cfe7e7
2 changed files with 5 additions and 6 deletions
+5 -5
View File
@@ -7,21 +7,21 @@ all: fmt lint
fmt: fmt-nix fmt-shell
fmt-nix:
find . -name '*.nix' -not -path './.direnv/*' | xargs nixfmt
find . -name '*.nix' -not -path './.direnv/*' -print0 | xargs -0 -r nixfmt
fmt-shell:
find . -name '*.sh' -not -path './.direnv/*' | xargs shfmt -w -i 2
find . -name '*.sh' -not -path './.direnv/*' -print0 | xargs -0 -r shfmt -w -i 2
# Validation
lint: lint-shell
lint-shell:
find . -name '*.sh' -not -path './.direnv/*' | xargs shellcheck
find . -name '*.sh' -not -path './.direnv/*' -print0 | xargs -0 -r shellcheck
# Vérification sans modification
check:
find . -name '*.nix' -not -path './.direnv/*' | xargs nixfmt --check
find . -name '*.sh' -not -path './.direnv/*' | xargs shfmt -d -i 2
find . -name '*.nix' -not -path './.direnv/*' -print0 | xargs -0 -r nixfmt --check
find . -name '*.sh' -not -path './.direnv/*' -print0 | xargs -0 -r shfmt -d -i 2
# Nettoyage
clean: