From: Brian Behlendorf Date: Mon, 1 Aug 2016 18:00:47 +0000 (+0000) Subject: Add `make lint` target X-Git-Tag: zfs-0.7.0-rc1~58 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b64e02e5805e84dcaa4b0820b555b9f90aa5afea;p=zfs Add `make lint` target Add a `make lint` target which maps to a cppcheck target. As with the shellcheck target it will only run when cppcheck is installed. This allows a `make lint` build check to be incrementally added to the automated testing for distribution which provide cppcheck. Signed-off-by: Brian Behlendorf Closes #4915 --- diff --git a/Makefile.am b/Makefile.am index ca8c8a0aa..b0d23d00c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -55,6 +55,13 @@ shellcheck: done; \ fi +lint: cppcheck + +cppcheck: + @if type cppcheck > /dev/null 2>&1; then \ + cppcheck --quiet --force ${top_srcdir}; \ + fi + ctags: $(RM) tags find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags