.pre-commit-config.yaml 1.8 KB
Newer Older
lizz's avatar
lizz committed
1
exclude: ^tests/data/
Kai Chen's avatar
Kai Chen committed
2
repos:
Wenwei Zhang's avatar
Wenwei Zhang committed
3
  - repo: https://gitlab.com/pycqa/flake8.git
4
    rev: 3.8.3
Wenwei Zhang's avatar
Wenwei Zhang committed
5
6
    hooks:
      - id: flake8
7
8
  - repo: https://github.com/PyCQA/isort
    rev: 5.10.1
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.30.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: v3.1.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
29
  - repo: https://github.com/markdownlint/markdownlint
    rev: v0.11.0
Kai Chen's avatar
Kai Chen committed
30
31
    hooks:
      - id: markdownlint
32
33
        args: ["-r", "~MD002,~MD013,~MD029,~MD033,~MD034",
              "-t", "allow_different_nesting"]
34
35
36
37
  - repo: https://github.com/codespell-project/codespell
    rev: v2.1.0
    hooks:
      - id: codespell
Kai Chen's avatar
Kai Chen committed
38
39
40
41
42
  - repo: https://github.com/myint/docformatter
    rev: v1.3.1
    hooks:
      - id: docformatter
        args: ["--in-place", "--wrap-descriptions", "79"]
43
44
45
46
47
48

  - 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"]
49
50
51
52
53
54
55
56
57
  - 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
58
59
60
61
62
63
64
65
  # - 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)$