From a0022f1cfbb3d8f1f8f3ff135f854be0cb89643f Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Sat, 2 Jan 2021 12:10:32 +0100 Subject: [PATCH 1/3] test: bump codespell linter version to 2.0.0 --- ci/lint/04_install.sh | 2 +- test/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/lint/04_install.sh b/ci/lint/04_install.sh index b7e40c0f481..a0b579de1e0 100755 --- a/ci/lint/04_install.sh +++ b/ci/lint/04_install.sh @@ -11,7 +11,7 @@ ${CI_RETRY_EXE} apt-get install -y clang-format-9 python3-pip curl git gawk jq update-alternatives --install /usr/bin/clang-format clang-format $(which clang-format-9 ) 100 update-alternatives --install /usr/bin/clang-format-diff clang-format-diff $(which clang-format-diff-9) 100 -${CI_RETRY_EXE} pip3 install codespell==1.17.1 +${CI_RETRY_EXE} pip3 install codespell==2.0.0 ${CI_RETRY_EXE} pip3 install flake8==3.8.3 ${CI_RETRY_EXE} pip3 install yq ${CI_RETRY_EXE} pip3 install mypy==0.781 diff --git a/test/README.md b/test/README.md index 2341eef00d5..17bf8a1406d 100644 --- a/test/README.md +++ b/test/README.md @@ -264,7 +264,7 @@ Use the `-v` option for verbose output. | [`lint-python.sh`](lint/lint-python.sh) | [mypy](https://github.com/python/mypy) | [0.781](https://github.com/bitcoin/bitcoin/pull/19348) | `pip3 install mypy==0.781` | [`lint-shell.sh`](lint/lint-shell.sh) | [ShellCheck](https://github.com/koalaman/shellcheck) | [0.7.1](https://github.com/bitcoin/bitcoin/pull/19348) | [details...](https://github.com/koalaman/shellcheck#installing) | [`lint-shell.sh`](lint/lint-shell.sh) | [yq](https://github.com/kislyuk/yq) | default | `pip3 install yq` -| [`lint-spelling.sh`](lint/lint-spelling.sh) | [codespell](https://github.com/codespell-project/codespell) | [1.17.1](https://github.com/bitcoin/bitcoin/pull/19348) | `pip3 install codespell==1.17.1` +| [`lint-spelling.sh`](lint/lint-spelling.sh) | [codespell](https://github.com/codespell-project/codespell) | [2.0.0](https://github.com/bitcoin/bitcoin/pull/20817) | `pip3 install codespell==2.0.0` Please be aware that on Linux distributions all dependencies are usually available as packages, but could be outdated. From da289a6c4a0a5e110e301f34f1db57b6d31bcdcc Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Thu, 31 Dec 2020 11:09:07 +0100 Subject: [PATCH 2/3] lint: update list of spelling linter false positives --- test/lint/lint-spelling.ignore-words.txt | 25 ++++++++++++------------ 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/test/lint/lint-spelling.ignore-words.txt b/test/lint/lint-spelling.ignore-words.txt index 34f54325b30..be3a88a6eec 100644 --- a/test/lint/lint-spelling.ignore-words.txt +++ b/test/lint/lint-spelling.ignore-words.txt @@ -1,17 +1,16 @@ +asend +atack +blockin +cachable +fo +fpr hights +hist +inout mor -mut -objext +nin +ser +unparseable +unser useable wit -unparseable -copyable -cachable -errorstring -keyserver -homogenous -setban -hist -ser -unselect -lowercased From f3ba916e8b5b5ee2a381cef38882671eadb231df Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Fri, 1 Jan 2021 23:29:47 +0100 Subject: [PATCH 3/3] lint: ignore gitian keys file for spelling linter Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> --- test/lint/lint-spelling.ignore-words.txt | 1 - test/lint/lint-spelling.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/test/lint/lint-spelling.ignore-words.txt b/test/lint/lint-spelling.ignore-words.txt index be3a88a6eec..78ffe4def3e 100644 --- a/test/lint/lint-spelling.ignore-words.txt +++ b/test/lint/lint-spelling.ignore-words.txt @@ -1,5 +1,4 @@ asend -atack blockin cachable fo diff --git a/test/lint/lint-spelling.sh b/test/lint/lint-spelling.sh index cb84727ba5a..fbdf3c59c1a 100755 --- a/test/lint/lint-spelling.sh +++ b/test/lint/lint-spelling.sh @@ -15,6 +15,6 @@ if ! command -v codespell > /dev/null; then fi IGNORE_WORDS_FILE=test/lint/lint-spelling.ignore-words.txt -if ! codespell --check-filenames --disable-colors --quiet-level=7 --ignore-words=${IGNORE_WORDS_FILE} $(git ls-files -- ":(exclude)build-aux/m4/" ":(exclude)contrib/seeds/*.txt" ":(exclude)depends/" ":(exclude)doc/release-notes/" ":(exclude)src/leveldb/" ":(exclude)src/crc32c/" ":(exclude)src/qt/locale/" ":(exclude)src/qt/*.qrc" ":(exclude)src/secp256k1/" ":(exclude)src/univalue/"); then +if ! codespell --check-filenames --disable-colors --quiet-level=7 --ignore-words=${IGNORE_WORDS_FILE} $(git ls-files -- ":(exclude)build-aux/m4/" ":(exclude)contrib/seeds/*.txt" ":(exclude)depends/" ":(exclude)doc/release-notes/" ":(exclude)src/leveldb/" ":(exclude)src/crc32c/" ":(exclude)src/qt/locale/" ":(exclude)src/qt/*.qrc" ":(exclude)src/secp256k1/" ":(exclude)src/univalue/" ":(exclude)contrib/gitian-keys/keys.txt"); then echo "^ Warning: codespell identified likely spelling errors. Any false positives? Add them to the list of ignored words in ${IGNORE_WORDS_FILE}" fi