From 81df90262e350fa316dc73a73947ac9a0e9dda28 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 22 Feb 2023 11:29:05 -0300 Subject: Makefile: Add "check-nixfmt" target --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6ddc362..dd968f5 100644 --- a/Makefile +++ b/Makefile @@ -92,6 +92,9 @@ check-perlcritic: xargs awk '/^#!\/usr\/bin\/env perl$$/ { print FILENAME } { nextfile }' | \ xargs perlcritic --exclude=subroutine +check-nixfmt: + git ls-files | sor 'test -f' | grep -E '\.nix$$' | xargs nixfmt -c + FIXME-excludes = \ ':(exclude)Makefile' \ ':(exclude)etc/git/ignore' \ @@ -139,9 +142,9 @@ check-sync: exit 1; \ fi -check: check-shellcheck check-perlcritic check-fixme check-dirty-public \ - check-dirty-private check-dirty-pass check-opt check-pod \ - check-sync +check: check-shellcheck check-perlcritic check-nixfmt check-fixme \ + check-dirty-public check-dirty-private check-dirty-pass \ + check-opt check-pod check-sync @cd $(PRIV_CONFIG) && $(MAKE) $@ clean: -- cgit v1.2.3