From 8304d6fcbe626f48b3d4f72799ca4b2d491d1346 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Mon, 7 Aug 2017 17:28:24 -0600 Subject: util/lint: provide option to skip newline check The newline lint check takes forever as it checks every file in the git repo -- not just the files changed. To add insult to injury these checks are performed on every commit. Allow one to skip this check by setting the LINT_SKIP_NEWLINE_CHECK environment variable. Change-Id: I1cd5c50627b73d68b0da2fcb2d9546eb874a7959 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/20903 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer Reviewed-by: Furquan Shaikh --- util/lint/lint-stable-015-final-newlines | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/util/lint/lint-stable-015-final-newlines b/util/lint/lint-stable-015-final-newlines index bfaa817e1f..8abfb98c33 100755 --- a/util/lint/lint-stable-015-final-newlines +++ b/util/lint/lint-stable-015-final-newlines @@ -46,6 +46,10 @@ test_for_final_newline() { done } +if [ -n "${LINT_SKIP_NEWLINE_CHECK}" ]; then + exit 0 +fi + ${FIND_FILES} | sed 's|^\./||' | sort | \ grep -v "$EXCLUDED_DIRS" | \ grep -v "$EXCLUDED_FILES" | \ -- cgit v1.2.3