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 <ngompa@datto.com>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #8281
This commit is contained in:
loli10K 2019-01-15 20:56:29 +01:00 committed by Brian Behlendorf
parent 9b626c126e
commit 7b02fae7a6
2 changed files with 8 additions and 1 deletions

1
.gitignore vendored
View File

@ -60,3 +60,4 @@ cscope.*
*.tar.gz
*.patch
*.orig
*.log

View File

@ -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: