From 76fe5e6e2d81a68c6659b03c97d1a4fa7ba2a4b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20=27Morty=27=20Str=C3=BCbe?= Date: Fri, 11 Nov 2022 16:08:15 +0100 Subject: [PATCH] Make running code cleanliness less painfull * Only check for modifications in tracked files * Tell the user to stash stuff, before running --- releng/scripts/check_code_cleanliness.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/releng/scripts/check_code_cleanliness.sh b/releng/scripts/check_code_cleanliness.sh index 2ba565a3fab..120ec162c31 100755 --- a/releng/scripts/check_code_cleanliness.sh +++ b/releng/scripts/check_code_cleanliness.sh @@ -12,6 +12,10 @@ set -e +if test ! -z "$(git status -s -uno)"; then + echo "You have changes. Please stash them before continuing." +fi + ## # Check the features are all branded and all content has proper licenses ## @@ -28,7 +32,7 @@ ${DIR}/do_all_code_cleanups.sh ## # Check that none of the above caused any changes ## -if test -z "$(git status -s)"; then +if test -z "$(git status -s -uno)"; then echo "Tree looks clean!" else echo "Tree is dirty - something needs to be cleaned up in your commit (more info below)"