aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn Levon <levon@movementarian.org>2021-10-22 13:56:38 +0100
committerGitHub <noreply@github.com>2021-10-22 13:56:38 +0100
commit7fd786fa7f0023e7bf74618c6ebc3999f5736bc6 (patch)
tree79a152071fe31d3f6bd0b5e1fbecabc310e3c895 /Makefile
parent3111d8ec3ed5557b64434778fb2596908235bfa2 (diff)
downloadlibvfio-user-7fd786fa7f0023e7bf74618c6ebc3999f5736bc6.zip
libvfio-user-7fd786fa7f0023e7bf74618c6ebc3999f5736bc6.tar.gz
libvfio-user-7fd786fa7f0023e7bf74618c6ebc3999f5736bc6.tar.bz2
run python code through flake8 (#613)
Aside from general style goodness, this found a couple of accidental re-definitions, so it's worth taking the pain now. Also, only run rstlint as part of pre-push. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 11900cb..60e17bb 100644
--- a/Makefile
+++ b/Makefile
@@ -54,7 +54,8 @@ endif
GIT_SHA = $(shell git rev-parse --short HEAD)
CMAKE = $(shell bash -c "command -v cmake3 cmake" | head -1)
-RSTLINT= $(shell bash -c "command -v restructuredtext-lint /bin/true" | head -1)
+RSTLINT = $(shell bash -c "command -v restructuredtext-lint /bin/true" | head -1)
+FLAKE8 = $(shell bash -c "command -v flake8 /bin/true" | head -1)
BUILD_DIR_BASE = $(CURDIR)/build
BUILD_DIR = $(BUILD_DIR_BASE)/$(BUILD_TYPE)
@@ -65,7 +66,6 @@ INSTALL_PREFIX ?= /usr/local
.PHONY: pre-push clean realclean tags gcov
all install: $(BUILD_DIR)/Makefile
- $(RSTLINT) docs/vfio-user.rst
+$(MAKE) -C $(BUILD_DIR) $@
#
@@ -126,6 +126,8 @@ endif
cd $(BUILD_DIR)/test; ctest --verbose
pre-push: realclean
+ $(RSTLINT) docs/vfio-user.rst
+ $(FLAKE8) --extend-ignore=F405,F403,E128,E131,E127 $$(find . -name '*.py')
make test WITH_ASAN=1
make realclean
make test CC=clang BUILD_TYPE=rel