aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe Di Natale <[email protected]>2016-10-06 10:50:15 -0700
committerGiuseppe Di Natale <[email protected]>2016-10-06 10:52:21 -0700
commit46bb91e19307982c2dc829e0d88b012c5f571b8c (patch)
tree2a72e8096fe95ce3966bc7b0ffc30b44f5b8750e
parente169749fc0b87904cb48e8cca0c87501eb46ebac (diff)
Introduce a make recipe for flake8
Add a make recipe to enable developers to easily run flake8 if it is available. This will help enforce good python coding standards. Signed-off-by: Giuseppe Di Natale <[email protected]>
-rw-r--r--Makefile.am7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index abc98e4ed..26f684d59 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -39,7 +39,7 @@ dist-hook:
sed -i 's/Release:[[:print:]]*/Release: $(RELEASE)/' \
$(distdir)/META
-checkstyle: cstyle shellcheck
+checkstyle: cstyle shellcheck flake8
cstyle:
@find ${top_srcdir} -name '*.[hc]' ! -name 'zfs_config.*' \
@@ -62,6 +62,11 @@ cppcheck:
cppcheck --quiet --force --error-exitcode=2 ${top_srcdir}; \
fi
+flake8:
+ @if type flake8 > /dev/null 2>&1; then \
+ flake8 ${top_srcdir}; \
+ fi
+
ctags:
$(RM) tags
find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags