From 6887721802db6534f15af57dfb9241fcf8658069 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Fri, 25 Mar 2016 09:19:16 -0700 Subject: [PATCH] scripts/check_format: use git to find text files Use 'git grep -I' to determine the list of files that git considers to be text (rather than hardcoding a list of known text file extensions) and check all of them for newline at end of file. Change-Id: I9b947176af2792c139a2782856e3c41061e18f10 Signed-off-by: Daniel Verkamp --- scripts/check_format.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check_format.sh b/scripts/check_format.sh index 44d43e8e3..9f9c9fef6 100755 --- a/scripts/check_format.sh +++ b/scripts/check_format.sh @@ -30,7 +30,7 @@ else exit 0 fi -git ls-files -z '*.c' '*.cpp' '*.h' '*.txt' '*.md' '*.mk' '*.txt' '*.sh' '*.py' | \ +git grep -I -l -e . -z | \ xargs -0 -P8 -n1 scripts/eofnl exit 0