Skip to content

Commit 39d526b

Browse files
committed
test: Bump linter versions
Updates Python linters, spellchecking, and ShellCheck versions. The PR links are updated for the dependency versions in test/README.md. ShellCheck SC2230 removed to align with with new behaviour in v0.7.1. Fixes bitcoin#19346.
1 parent e3fa3c7 commit 39d526b

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

ci/lint/04_install.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
export LC_ALL=C
88

9-
travis_retry pip3 install codespell==1.15.0
10-
travis_retry pip3 install flake8==3.7.8
9+
travis_retry pip3 install codespell==1.17.1
10+
travis_retry pip3 install flake8==3.8.3
1111
travis_retry pip3 install yq
12-
travis_retry pip3 install mypy==0.700
12+
travis_retry pip3 install mypy==0.781
1313

14-
SHELLCHECK_VERSION=v0.6.0
15-
curl -s "https://storage.googleapis.com/shellcheck/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar --xz -xf - --directory /tmp/
14+
SHELLCHECK_VERSION=v0.7.1
15+
curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar --xz -xf - --directory /tmp/
1616
export PATH="/tmp/shellcheck-${SHELLCHECK_VERSION}:${PATH}"

test/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,11 @@ Use the `-v` option for verbose output.
260260

261261
| Lint test | Dependency | Version [used by CI](../ci/lint/04_install.sh) | Installation
262262
|-----------|:----------:|:-------------------------------------------:|--------------
263-
| [`lint-python.sh`](lint/lint-python.sh) | [flake8](https://gitlab.com/pycqa/flake8) | [3.7.8](https://github.com/bitcoin/bitcoin/pull/15257) | `pip3 install flake8==3.7.8`
264-
| [`lint-python.sh`](lint/lint-python.sh) | [mypy](https://github.com/python/mypy) | [0.700](https://github.com/bitcoin/bitcoin/pull/18210) | `pip3 install mypy==0.700`
265-
| [`lint-shell.sh`](lint/lint-shell.sh) | [ShellCheck](https://github.com/koalaman/shellcheck) | [0.6.0](https://github.com/bitcoin/bitcoin/pull/15166) | [details...](https://github.com/koalaman/shellcheck#installing)
263+
| [`lint-python.sh`](lint/lint-python.sh) | [flake8](https://gitlab.com/pycqa/flake8) | [3.8.3](https://github.com/bitcoin/bitcoin/pull/19348) | `pip3 install flake8==3.8.3`
264+
| [`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`
265+
| [`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)
266266
| [`lint-shell.sh`](lint/lint-shell.sh) | [yq](https://github.com/kislyuk/yq) | default | `pip3 install yq`
267-
| [`lint-spelling.sh`](lint/lint-spelling.sh) | [codespell](https://github.com/codespell-project/codespell) | [1.15.0](https://github.com/bitcoin/bitcoin/pull/16186) | `pip3 install codespell==1.15.0`
267+
| [`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`
268268

269269
Please be aware that on Linux distributions all dependencies are usually available as packages, but could be outdated.
270270

test/lint/lint-python.sh

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ enabled=(
3939
E711 # comparison to None should be 'if cond is None:'
4040
E714 # test for object identity should be "is not"
4141
E721 # do not compare types, use "isinstance()"
42-
E741 # do not use variables named "l", "O", or "I"
4342
E742 # do not define classes named "l", "O", or "I"
4443
E743 # do not define functions named "l", "O", or "I"
4544
E901 # SyntaxError: invalid syntax

test/lint/lint-shell.sh

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ disabled=(
2525
disabled_gitian=(
2626
SC2094 # Make sure not to read and write the same file in the same pipeline.
2727
SC2129 # Consider using { cmd1; cmd2; } >> file instead of individual redirects.
28-
SC2230 # which is non-standard. Use builtin 'command -v' instead.
2928
)
3029

3130
EXIT_CODE=0

0 commit comments

Comments
 (0)