From 46bb91e19307982c2dc829e0d88b012c5f571b8c Mon Sep 17 00:00:00 2001 From: Giuseppe Di Natale Date: Thu, 6 Oct 2016 10:50:15 -0700 Subject: 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 --- Makefile.am | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Makefile.am') 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 -- cgit v1.2.3