repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v3.4.0
    hooks:
      - id: check-added-large-files
      - id: check-case-conflict
      - id: check-executables-have-shebangs
      - id: check-merge-conflict
      - id: check-json
      - id: check-toml
      - id: check-yaml
      - id: check-symlinks
      - id: destroyed-symlinks
  - repo: https://gitlab.com/pycqa/flake8
    rev: 3.8.4
    hooks:
      - id: flake8
        alias: be
        exclude: ^frontend/
  - repo: https://github.com/shellcheck-py/shellcheck-py
    rev: v0.7.1.1
    hooks:
      - id: shellcheck
  - repo: local
    hooks:
      - id: fe
        name: lint-staged
        entry: ./frontend/scripts/lint-staged.sh
        language: node
        files: ^frontend/
        description: lint frontend code by lint-staged
  - repo: meta
    hooks:
      - id: check-hooks-apply
      - id: check-useless-excludes
  - repo: https://github.com/asottile/reorder_python_imports
    rev: v2.4.0
    hooks:
      - id: reorder-python-imports

  - repo: local
    hooks:
      - id: yapf
        name: yapf
        entry: yapf
        language: system
        args: [-i, --style .style.yapf]
        files: \.py$
