From b64e02e5805e84dcaa4b0820b555b9f90aa5afea Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 1 Aug 2016 18:00:47 +0000 Subject: 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 --- Makefile.am | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Makefile.am') 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 -- cgit v1.2.3