Skip to content

Commit

Permalink
Add make lint target
Browse files Browse the repository at this point in the history
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 <behlendorf1@llnl.gov>
Closes openzfs#4915
  • Loading branch information
behlendorf committed Aug 2, 2016
1 parent 4eb0db4 commit b64e02e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b64e02e

Please sign in to comment.