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 <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/20903 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
parent
c30d913f1f
commit
8304d6fcbe
|
@ -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" | \
|
||||
|
|
Loading…
Reference in New Issue