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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user