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>
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.*' \
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