diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 44 |
1 files changed, 44 insertions, 0 deletions
@@ -31,5 +31,49 @@ $(XDG_DATA_HOME)/euandreh/e.list.txt: ~/Documents/txt/ opt/aux/gen-e-list.sh +check-shellcheck: + git ls-files | \ + xargs awk '/^#!\/bin\/sh$$/ { print FILENAME } { nextfile }' | \ + xargs shellcheck -x + +check-perlcritic: + git ls-files | \ + xargs awk '/^#!\/usr\/bin\/env perl$$/ { print FILENAME } { nextfile }' | \ + xargs perlcritic + +check-fixme: + if git grep FIXME -- ':(exclude)Makefile'; then \ + printf 'Leftover FIXME markers.\n' >&2; \ + exit 1; \ + fi + +check-dirty-public: + if ! git diff --quiet || ! git diff --quiet --staged; then \ + printf 'Dirty tilde repository.\n' >&2; \ + exit 1; \ + fi + +check-dirty-private: + if ! git -C $(PRIV_CONFIG) diff --quiet || \ + ! git -C $(PRIV_CONFIG) diff --quiet --staged; then \ + printf 'Dirty private tilde repository.\n' >&2; \ + exit 1; \ + fi + +check-opt: + find opt/tests/ -name '*.sh' -exec {} + + +check-pod: + podchecker bin/z + +check-sync: + if git status --short --branch --porcelain | head -n1 | grep -E '(ahead|behind)'; then \ + printf 'Out of sync with origin.\n' >&2; \ + exit 1; \ + fi + +check: check-shellcheck check-perlcritic check-fixme check-dirty-public \ + check-dirty-private check-opt check-pod check-sync + clean: rm -f $(derived-assets) |