From f1799b9910220c38ec6a2bc7ed88f4ee260399a0 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Wed, 23 Oct 2019 21:15:42 +0200 Subject: [PATCH] dist/tools/codespell: add interactive mode --- dist/tools/codespell/check.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dist/tools/codespell/check.sh b/dist/tools/codespell/check.sh index 6a281a23cc..081c09e6a2 100755 --- a/dist/tools/codespell/check.sh +++ b/dist/tools/codespell/check.sh @@ -41,6 +41,15 @@ CODESPELL_OPTS+=" --check-hidden" # "dout => doubt" CODESPELL_OPTS+=" --ignore-words-list=ND,nd,wan,od,dout" +if [ "${CODESPELL_INTERACTIVE}" = "1" ]; then + # interactive mode + CODESPELL_OPTS+=" -w -i3" + exec ${CODESPELL_CMD} ${CODESPELL_OPTS} ${FILES} + # (exits shell) +fi + +# non-interactive mode + # Filter-out all false positive raising "disabled due to" messages. ERRORS=$(${CODESPELL_CMD} ${CODESPELL_OPTS} ${FILES} | grep -ve "disabled due to")