From 078ae49dc7009257f792bd9e91cfca7e47396a35 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Thu, 25 Jun 2020 11:08:37 -0400 Subject: [PATCH] partial merge #19348: test: Bump linter versions 39d526bde48d98af4fa27906e85db0399b6aa8b1 test: Bump linter versions (Duncan Dean) Pull request description: As per #19346, `mypy==0.700` was incompatible with Python 3.8. I've bumped the versions of all the linters to their latest stable versions. Checked with both Python 3.7 and 3.8 and everything still seems to work fine. ACKs for top commit: hebasto: ACK 39d526bde48d98af4fa27906e85db0399b6aa8b1, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: f3ee7fda8095aa25aa68685e863076d52a6b82649770d24b0064d652763c0ceb8ebcbf9024fc74fca45c754e67b2a831dd070b3af23bc099140e6d27e89a5319 --- .travis/lint_04_install.sh | 8 ++++---- ci/Dockerfile.builder | 8 ++++---- test/README.md | 6 +++--- test/lint/lint-python.sh | 1 - test/lint/lint-shell.sh | 1 - 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.travis/lint_04_install.sh b/.travis/lint_04_install.sh index ac164307c0..18af460b83 100755 --- a/.travis/lint_04_install.sh +++ b/.travis/lint_04_install.sh @@ -6,11 +6,11 @@ export LC_ALL=C -travis_retry pip3 install codespell==1.15.0 -travis_retry pip3 install flake8==3.7.8 +travis_retry pip3 install codespell==1.17.1 +travis_retry pip3 install flake8==3.8.3 travis_retry pip3 install vulture==2.3 travis_retry pip3 install yq -SHELLCHECK_VERSION=v0.6.0 -curl -s "https://storage.googleapis.com/shellcheck/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar --xz -xf - --directory /tmp/ +SHELLCHECK_VERSION=v0.7.1 +curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar --xz -xf - --directory /tmp/ export PATH="/tmp/shellcheck-${SHELLCHECK_VERSION}:${PATH}" diff --git a/ci/Dockerfile.builder b/ci/Dockerfile.builder index 5dfde1b2a7..8a45a6d500 100644 --- a/ci/Dockerfile.builder +++ b/ci/Dockerfile.builder @@ -15,8 +15,8 @@ RUN apt-get update && apt-get install $APT_ARGS python3-pip python3-setuptools & # Python stuff RUN pip3 install pyzmq # really needed? RUN pip3 install jinja2 -RUN pip3 install flake8==3.7.8 -RUN pip3 install codespell==1.15.0 +RUN pip3 install flake8==3.8.3 +RUN pip3 install codespell==1.17.1 RUN pip3 install vulture==2.3 RUN pip3 install yq @@ -43,8 +43,8 @@ RUN apt-get update && apt-get install $APT_ARGS python3-zmq && rm -rf /var/lib/a RUN apt-get update && apt-get install $APT_ARGS cppcheck && rm -rf /var/lib/apt/lists/* RUN apt-get update && apt-get install $APT_ARGS imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools && rm -rf /var/lib/apt/lists/* -ARG SHELLCHECK_VERSION=v0.6.0 -RUN curl -s "https://storage.googleapis.com/shellcheck/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar --xz -xf - --directory /tmp/ +ARG SHELLCHECK_VERSION=v0.7.1 +RUN curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar --xz -xf - --directory /tmp/ ENV PATH "/tmp/shellcheck-${SHELLCHECK_VERSION}:${PATH}" # This is a hack. It is needed because gcc-multilib and g++-multilib are conflicting with g++-arm-linux-gnueabihf. This is diff --git a/test/README.md b/test/README.md index b013f0abd4..8b9ea0677c 100644 --- a/test/README.md +++ b/test/README.md @@ -237,9 +237,9 @@ Use the `-v` option for verbose output. | Lint test | Dependency | Version [used by CI](../ci/lint/04_install.sh) | Installation |-----------|:----------:|:-------------------------------------------:|-------------- -| [`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` -| [`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) -| [`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` +| [`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` +| [`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-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` Please be aware that on Linux distributions all dependencies are usually available as packages, but could be outdated. diff --git a/test/lint/lint-python.sh b/test/lint/lint-python.sh index 750eb9f0c5..98519a044c 100755 --- a/test/lint/lint-python.sh +++ b/test/lint/lint-python.sh @@ -38,7 +38,6 @@ enabled=( # E711 # comparison to None should be 'if cond is None:' E714 # test for object identity should be "is not" E721 # do not compare types, use "isinstance()" - # E741 # do not use variables named "l", "O", or "I" E742 # do not define classes named "l", "O", or "I" E743 # do not define functions named "l", "O", or "I" E901 # SyntaxError: invalid syntax diff --git a/test/lint/lint-shell.sh b/test/lint/lint-shell.sh index 4b0619a926..ca971456eb 100755 --- a/test/lint/lint-shell.sh +++ b/test/lint/lint-shell.sh @@ -41,7 +41,6 @@ disabled=( disabled_gitian=( SC2094 # Make sure not to read and write the same file in the same pipeline. SC2129 # Consider using { cmd1; cmd2; } >> file instead of individual redirects. - SC2230 # which is non-standard. Use builtin 'command -v' instead. ) EXIT_CODE=0