From 7b02fae7a6670579437d1fb490362f70168b0666 Mon Sep 17 00:00:00 2001 From: loli10K Date: Tue, 15 Jan 2019 20:56:29 +0100 Subject: [PATCH] Verify .gitignore entries This change adds a make target 'vcscheck' which scans the git workspace for new, untracked files missing from the .gitignore configuration; this is done to help prevent adding unwanted build artifacts to the source tree during development. Reviewed-by: Neal Gompa Reviewed-by: Giuseppe Di Natale Reviewed-by: Brian Behlendorf Signed-off-by: loli10K Closes #8281 --- .gitignore | 1 + Makefile.am | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6367ebf778..99dc87c948 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,4 @@ cscope.* *.tar.gz *.patch *.orig +*.log diff --git a/Makefile.am b/Makefile.am index 43891af710..02e1044348 100644 --- a/Makefile.am +++ b/Makefile.am @@ -75,7 +75,7 @@ install-data-hook: ln -fs zfs.release spl.release endif -codecheck: cstyle shellcheck flake8 mancheck testscheck +codecheck: cstyle shellcheck flake8 mancheck testscheck vcscheck checkstyle: codecheck commitcheck @@ -117,6 +117,12 @@ testscheck: xargs -r stat -c '%A %n' | \ awk '{c++; print} END {if(c>0) exit 1}' +vcscheck: + @if git rev-parse --git-dir > /dev/null 2>&1; then \ + git ls-files . --exclude-standard --others | \ + awk '{c++; print} END {if(c>0) exit 1}' ; \ + fi + lint: cppcheck paxcheck cppcheck: