2021-04-05 22:20:32 +08:00
|
|
|
repos:
|
|
|
|
- repo: https://github.com/pycqa/isort
|
|
|
|
rev: 5.8.0
|
|
|
|
hooks:
|
|
|
|
- id: isort
|
|
|
|
name: isort (python)
|
|
|
|
- id: isort
|
|
|
|
name: isort (cython)
|
|
|
|
types: [cython]
|
|
|
|
- id: isort
|
|
|
|
name: isort (pyi)
|
|
|
|
types: [pyi]
|
|
|
|
- repo: https://github.com/psf/black
|
|
|
|
rev: 20.8b1
|
|
|
|
hooks:
|
|
|
|
- id: black
|
|
|
|
- repo: https://gitlab.com/pycqa/flake8
|
|
|
|
rev: 3.9.0
|
|
|
|
hooks:
|
|
|
|
- id: flake8
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
|
|
rev: v2.3.0
|
|
|
|
hooks:
|
|
|
|
- id: check-added-large-files
|
|
|
|
- id: check-case-conflict
|
|
|
|
- id: check-json
|
|
|
|
- id: check-merge-conflict
|
|
|
|
- id: detect-private-key
|
|
|
|
- id: end-of-file-fixer
|
|
|
|
- id: trailing-whitespace
|
2021-04-12 20:15:52 +08:00
|
|
|
- repo: https://github.com/eslint/eslint
|
|
|
|
rev: v7.24.0
|
|
|
|
hooks:
|
|
|
|
- id: eslint
|
2021-04-15 18:41:09 +08:00
|
|
|
args: ["monkey/monkey_island/cc/ui/src/", "--fix", "--max-warnings=0"]
|
2021-04-19 19:58:40 +08:00
|
|
|
- repo: local
|
|
|
|
hooks:
|
|
|
|
- id: pytest
|
|
|
|
name: pytest
|
|
|
|
entry: bash -c "cd monkey && pytest"
|
|
|
|
language: system
|
|
|
|
pass_filenames: false
|
|
|
|
# alternatively you could `types: [python]` so it only runs when python files change
|
|
|
|
# though tests might be invalidated if you were to say change a data file
|
|
|
|
always_run: true
|