From 2d0ee1a69eb999be83412cff7d6ab4b26607545d Mon Sep 17 00:00:00 2001 From: Carsten Grohmann Date: Fri, 11 Nov 2022 20:44:32 +0100 Subject: [PATCH] Add rules to run black to Makefile Added: black : Run source code formatter black black-check : Run source code formatter black in check-only mode --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile b/Makefile index 843fa42..ada925b 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,9 @@ RELEASE_INST_DIR = $(RELEASE_DIR)/OOMAnalyser-$(VERSION) RELEASE_TARGZ = OOMAnalyser-$(VERSION).tar.gz RELEASE_ZIP = OOMAnalyser-$(VERSION).zip +BLACK_BIN = black +BLACK_OPTS = --verbose + ROLLUP_BIN = rollup ROLLUP_OPTS = --config rollup.config.js @@ -50,6 +53,14 @@ HELP= @grep -B1 '^[a-zA-Z\-]*:' Makefile |\ help: $(HELP) +#+ Run source code formatter black +black: + $(BLACK_BIN) $(BLACK_OPTS) $(PY_SOURCE) $(TEST_FILE) + +#+ Run source code formatter black in check-only mode +black-check: + $(BLACK_BIN) --check $(BLACK_OPTS) $(PY_SOURCE) $(TEST_FILE) + #+ Clean python compiler files and automatically generated files clean: @echo "Remove all automatically generated files ..."