From 5cf8aaf7a15c6ae52d88948bd7adb8be4e9ea935 Mon Sep 17 00:00:00 2001 From: jo Date: Mon, 16 Aug 2021 13:20:27 +0200 Subject: [PATCH] Add global Makefile for project management --- Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..ef15c9b57 --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +.PHONY: setup + +SHELL = bash + +all: setup + +setup: + command -v pre-commit > /dev/null && pre-commit install + +# https://google.github.io/styleguide/shellguide.html +shell-format: + shfmt -f . | xargs shfmt -i 2 -ci -sr -kp -w + +shell-check: + shfmt -f . | xargs shfmt -i 2 -ci -sr -kp -d + shfmt -f . | xargs shellcheck --color=always