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 <dinatale2@llnl.gov>
This commit is contained in:
Giuseppe Di Natale 2016-10-06 10:50:15 -07:00
parent e169749fc0
commit 46bb91e193
1 changed files with 6 additions and 1 deletions

View File

@ -39,7 +39,7 @@ dist-hook:
sed -i 's/Release:[[:print:]]*/Release: $(RELEASE)/' \ sed -i 's/Release:[[:print:]]*/Release: $(RELEASE)/' \
$(distdir)/META $(distdir)/META
checkstyle: cstyle shellcheck checkstyle: cstyle shellcheck flake8
cstyle: cstyle:
@find ${top_srcdir} -name '*.[hc]' ! -name 'zfs_config.*' \ @find ${top_srcdir} -name '*.[hc]' ! -name 'zfs_config.*' \
@ -62,6 +62,11 @@ cppcheck:
cppcheck --quiet --force --error-exitcode=2 ${top_srcdir}; \ cppcheck --quiet --force --error-exitcode=2 ${top_srcdir}; \
fi fi
flake8:
@if type flake8 > /dev/null 2>&1; then \
flake8 ${top_srcdir}; \
fi
ctags: ctags:
$(RM) tags $(RM) tags
find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags