From 0cef23d33ad228114cab18e9cebc62e6d8f4d054 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 1 Feb 2018 13:35:34 +1030 Subject: [PATCH] check-spelling: don't paginate, and give file and line. The pagination causes it to wait for a keypress even with no output under emacs (complaining about the terminal); we don't want it anyway. Example output: Makefile:228:#lighnting! Identified a likely misspelling of the word "lightning" (see above). Please fix. Is this warning incorrect? Please teach tools/check-spelling.sh about the exciting new word. Makefile:230: recipe for target 'check-spelling' failed Signed-off-by: Rusty Russell --- tools/check-spelling.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/check-spelling.sh b/tools/check-spelling.sh index 082ddf709..e258897bc 100755 --- a/tools/check-spelling.sh +++ b/tools/check-spelling.sh @@ -1,6 +1,6 @@ #!/bin/bash -git grep -iE 'l[ightn]{6}g|l[ightn]{8}g|ilghtning|lgihtning|lihgtning|ligthning|lighnting|lightinng|lightnnig|lightnign' -- . ':!tools/check-spelling.sh' +git --no-pager grep -nHiE 'l[ightn]{6}g|l[ightn]{8}g|ilghtning|lgihtning|lihgtning|ligthning|lighnting|lightinng|lightnnig|lightnign' -- . ':!tools/check-spelling.sh' if [[ $? == 0 ]]; then echo "Identified a likely misspelling of the word \"lightning\" (see above). Please fix." echo "Is this warning incorrect? Please teach tools/check-spelling.sh about the exciting new word."