diff options
author | Jan Willhaus <mail@janwillhaus.de> | 2019-05-19 19:25:47 +0200 |
---|---|---|
committer | Jan Willhaus <mail@janwillhaus.de> | 2019-05-19 22:20:25 +0200 |
commit | 77dc2d846fad4b95758b2aa7d3a46c48e045ca1a (patch) | |
tree | d279e65d5fb3c2236b6bf46d3345b99b0e5f7e87 | |
parent | 44ca6f5d0f8cdc2c5fbe691eb0924c49ad33b470 (diff) | |
download | warlock-77dc2d846fad4b95758b2aa7d3a46c48e045ca1a.tar.gz |
Adjust travis linting pipeline to use pre-commit framework
-rw-r--r-- | .pre-commit-config.yaml | 12 | ||||
-rw-r--r-- | .travis.yml | 7 |
2 files changed, 12 insertions, 7 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7c5db18..4870756 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,18 +4,24 @@ repos: hooks: - id: trailing-whitespace args: [--markdown-linebreak-ext=md] - - id: flake8 - id: name-tests-test args: ['--django'] - id: end-of-file-fixer - - id: check-added-large-files + - repo: https://github.com/asottile/reorder_python_imports rev: master hooks: - id: reorder-python-imports + + - repo: https://gitlab.com/pycqa/flake8 + rev: master + hooks: + - id: flake8 + additional_dependencies: [flake8-bugbear] + - repo: https://github.com/ambv/black rev: stable hooks: - - id: black + - id: black default_language_version: python: python3.7 diff --git a/.travis.yml b/.travis.yml index a7dfcf3..032af2b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,12 +30,11 @@ jobs: after_success: - coveralls - - stage: linting python: 3.7 dist: xenial install: - - pip install -U black flake8 flake8-bugbear flake8-todo + - pip install pre-commit + - pre-commit install-hooks script: - - black --check --verbose . - - flake8 warlock + - pre-commit run --all-files |