Merge #13649: test: allow arguments to be forwarded to flake8 in lint-python.sh

854c85ae90 test: allow arguments to be forwarded to flake8 in lint-python.sh (James O'Beirne)

Pull request description:

  In order to use `lint-python.sh` from within various in-editor linting frameworks (e.g. [ALE](https://github.com/w0rp/ale), [flycheck](https://github.com/flycheck/flycheck)), we need to allow its arguments to be forwarded to the wrapped flake8 invocation.

  For what it's worth, here's my bitcoin-specific ALE vim config for doing so (requires this changeset):
  ```vim
  $ grep python /home/james/src/bitcoin/.exrc

  let g:ale_python_flake8_executable="/home/james/src/bitcoin/test/lint/lint-python.sh"
  ```

Tree-SHA512: 0d5500238ea5fde26ee9c21f6518a3a3dc8409c77ad1271ff7e7a94ef45a8c8d2e1b8ad3df3075dd4062ee0fff534625b1bc79613f869cd3c2d9260814ffc7ee
This commit is contained in:
MarcoFalke 2018-10-08 05:25:44 -03:00
commit a89896fadb
No known key found for this signature in database
GPG Key ID: D2EA4850E7528B25
1 changed files with 1 additions and 1 deletions

View File

@ -87,4 +87,4 @@ elif PYTHONWARNINGS="ignore" flake8 --version | grep -q "Python 2"; then
exit 0
fi
PYTHONWARNINGS="ignore" flake8 --ignore=B,C,E,F,I,N,W --select=E101,E112,E113,E115,E116,E125,E129,E131,E133,E223,E224,E242,E266,E271,E272,E273,E274,E275,E304,E306,E401,E402,E502,E701,E702,E703,E714,E721,E741,E742,E743,E901,E902,F401,F402,F403,F404,F405,F406,F407,F601,F602,F621,F622,F631,F701,F702,F703,F704,F705,F706,F707,F811,F812,F821,F822,F823,F831,F841,W191,W291,W292,W293,W504,W601,W602,W603,W604,W605,W606 .
PYTHONWARNINGS="ignore" flake8 --ignore=B,C,E,F,I,N,W --select=E101,E112,E113,E115,E116,E125,E129,E131,E133,E223,E224,E242,E266,E271,E272,E273,E274,E275,E304,E306,E401,E402,E502,E701,E702,E703,E714,E721,E741,E742,E743,E901,E902,F401,F402,F403,F404,F405,F406,F407,F601,F602,F621,F622,F631,F701,F702,F703,F704,F705,F706,F707,F811,F812,F821,F822,F823,F831,F841,W191,W291,W292,W293,W504,W601,W602,W603,W604,W605,W606 "${@:-.}"