Skip to content

Commit

Permalink
doc: Add ShellCheck to lint tests dependencies bitcoin#17353
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkLTZ committed Apr 10, 2020
1 parent ff2f58f commit 12906a1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,14 @@ Use the `-v` option for verbose output.

#### Dependencies

The lint tests require codespell and flake8. To install: `pip3 install codespell flake8`.
| 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-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.15.0](https://github.com/bitcoin/bitcoin/pull/16186) | `pip3 install codespell==1.15.0`

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

#### Running the tests

Expand Down
4 changes: 2 additions & 2 deletions test/lint/lint-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ enabled=(
)

if ! command -v flake8 > /dev/null; then
echo "Skipping Python linting since flake8 is not installed. Install by running \"pip3 install flake8\""
echo "Skipping Python linting since flake8 is not installed."
exit 0
elif PYTHONWARNINGS="ignore" flake8 --version | grep -q "Python 2"; then
echo "Skipping Python linting since flake8 is running under Python 2. Install the Python 3 version of flake8 by running \"pip3 install flake8\""
echo "Skipping Python linting since flake8 is running under Python 2. Install the Python 3 version of flake8."
exit 0
fi

Expand Down

0 comments on commit 12906a1

Please sign in to comment.