From d3de8fe500c736aa92aa87c9cd8b83fa4f44b7d8 Mon Sep 17 00:00:00 2001 From: Gaƫtan Gilbert Date: Tue, 24 Oct 2017 14:41:36 +0200 Subject: Linter: check that files end with newlines. We use git check-attr to look at the same files as git diff --check. --- dev/tools/should-check-whitespace.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 dev/tools/should-check-whitespace.sh (limited to 'dev/tools/should-check-whitespace.sh') diff --git a/dev/tools/should-check-whitespace.sh b/dev/tools/should-check-whitespace.sh new file mode 100755 index 000000000..8159506b4 --- /dev/null +++ b/dev/tools/should-check-whitespace.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +# determine if a file has whitespace checking enabled in .gitattributes + +git check-attr whitespace -- "$1" | grep -q -v 'unspecified$' -- cgit v1.2.3