.pre-commit-config.yaml 1.95 KB
Newer Older
lizz's avatar
lizz committed
1
exclude: ^tests/data/
Kai Chen's avatar
Kai Chen committed
2
repos:
3
  - repo: https://github.com/PyCQA/flake8
4
    rev: 5.0.4
Wenwei Zhang's avatar
Wenwei Zhang committed
5
6
    hooks:
      - id: flake8
tripleMu's avatar
tripleMu committed
7
8
  - repo: https://github.com/PyCQA/isort
    rev: 5.11.5
Wenwei Zhang's avatar
Wenwei Zhang committed
9
    hooks:
lizz's avatar
lizz committed
10
      - id: isort
Wenwei Zhang's avatar
Wenwei Zhang committed
11
  - repo: https://github.com/pre-commit/mirrors-yapf
12
    rev: v0.32.0
Wenwei Zhang's avatar
Wenwei Zhang committed
13
14
15
    hooks:
      - id: yapf
  - repo: https://github.com/pre-commit/pre-commit-hooks
16
    rev: v4.3.0
Wenwei Zhang's avatar
Wenwei Zhang committed
17
18
19
20
21
22
    hooks:
      - id: trailing-whitespace
      - id: check-yaml
      - id: end-of-file-fixer
      - id: requirements-txt-fixer
      - id: double-quote-string-fixer
23
      - id: check-merge-conflict
Wenwei Zhang's avatar
Wenwei Zhang committed
24
25
26
27
      - id: fix-encoding-pragma
        args: ["--remove"]
      - id: mixed-line-ending
        args: ["--fix=lf"]
28
  - repo: https://github.com/codespell-project/codespell
29
    rev: v2.2.1
30
31
    hooks:
      - id: codespell
32
  - repo: https://github.com/executablebooks/mdformat
33
    rev: 0.7.9
34
35
36
37
    hooks:
      - id: mdformat
        args: ["--number"]
        additional_dependencies:
38
          - mdformat-openmmlab
39
40
          - mdformat_frontmatter
          - linkify-it-py
Kai Chen's avatar
Kai Chen committed
41
42
43
44
45
  - repo: https://github.com/myint/docformatter
    rev: v1.3.1
    hooks:
      - id: docformatter
        args: ["--in-place", "--wrap-descriptions", "79"]
46
  - repo: https://github.com/asottile/pyupgrade
47
    rev: v3.0.0
48
49
50
    hooks:
      - id: pyupgrade
        args: ["--py36-plus"]
51
52
53
54
55
  - repo: https://github.com/open-mmlab/pre-commit-hooks
    rev: v0.2.0  # Use the ref you want to point at
    hooks:
      - id: check-copyright
        args: ["mmcv", "tests", "--excludes", "mmcv/ops"]
56
57
58
59
60
61
62
63
64
  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: v0.812
    hooks:
      - id: mypy
        exclude: |-
          (?x)(
              ^test
              | ^docs
          )
Kai Chen's avatar
Kai Chen committed
65
66
67
68
69
70
71
72
  # - repo: local
  #   hooks:
  #     - id: clang-format
  #       name: clang-format
  #       description: Format files with ClangFormat
  #       entry: clang-format -style=google -i
  #       language: system
  #       files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|cuh|proto)$