Skip to content

Commit

Permalink
Warn if checking programs are not installed
Browse files Browse the repository at this point in the history
`make checkstyle` silently skips checks if the required programs are not
installed (e.g. shellcheck, mandoc).  Therefore developers may not
realize that they are not getting the full suite of code checks.  This
also applies to more specific targets like `make shellcheck`.

We should print a warning message when a check is skipped due to missing
tools.

Reviewed-by: Giuseppe Di Natale <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed by: Pavel Zakharov <[email protected]>
Reviewed by: Prakash Surya <[email protected]>
Signed-off-by: Matthew Ahrens <[email protected]>
Closes openzfs#7984
  • Loading branch information
ahrens authored and behlendorf committed Oct 4, 2018
1 parent c23f8d4 commit 58c0f37
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ shellcheck:
$$(find ${top_srcdir}/scripts/*.sh -type f) \
$$(find ${top_srcdir}/cmd/zed/zed.d/*.sh -type f) \
$$(find ${top_srcdir}/cmd/zpool/zpool.d/* -executable); \
else \
echo "skipping shellcheck because shellcheck is not installed"; \
fi

mancheck:
Expand All @@ -89,6 +91,8 @@ mancheck:
-o -name 'zpool.8' -o -name 'zdb.8' \
-o -name 'zgenhostid.8' | \
xargs mandoc -Tlint -Werror; \
else \
echo "skipping mancheck because mandoc is not installed"; \
fi

testscheck:
Expand All @@ -107,16 +111,22 @@ cppcheck:
--suppressions-list=.github/suppressions.txt \
-UHAVE_SSE2 -UHAVE_AVX512F -UHAVE_UIO_ZEROCOPY \
-UHAVE_DNLC ${top_srcdir}; \
else \
echo "skipping cppcheck because cppcheck is not installed"; \
fi

paxcheck:
@if type scanelf > /dev/null 2>&1; then \
${top_srcdir}/scripts/paxcheck.sh ${top_srcdir}; \
else \
echo "skipping paxcheck because scanelf is not installed"; \
fi

flake8:
@if type flake8 > /dev/null 2>&1; then \
flake8 ${top_srcdir}; \
else \
echo "skipping flake8 because flake8 is not installed"; \
fi

ctags:
Expand Down

0 comments on commit 58c0f37

Please sign in to comment.