diff --git a/.travis.yml b/.travis.yml index c260a86..6bbfe44 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,14 @@ language: python python: 3.7 +install: + - pip install flake8 + script: - script/fetch-fixtures + - script/lint - script/test branches: only: - master diff --git a/script/lint b/script/lint new file mode 100755 index 0000000..e92006c --- /dev/null +++ b/script/lint @@ -0,0 +1,4 @@ +#!/bin/bash + +sources=$(git ls-files | grep '.py$') +flake8 --max-line-length 90 $sources diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 40c64c1..0000000 --- a/tox.ini +++ /dev/null @@ -1,20 +0,0 @@ -[tox] -envlist = lint, py - -[testenv:py] -deps = pytest -commands = pytest {posargs:tests} - -[testenv:lint] -deps = - black - flake8 - pylint -commands = - black -l 79 tree_sitter/__init__.py setup.py tests/test_tree_sitter.py - flake8 tree_sitter/__init__.py setup.py tests/test_tree_sitter.py - pylint tree_sitter/__init__.py setup.py tests/test_tree_sitter.py - -[flake8] -exclude = node_modules -ignore = E203,W503,F401