.pre-commit-config-zh-cn.yaml 1.98 KB
Newer Older
Zaida Zhou's avatar
Zaida Zhou committed
1
2
3
exclude: ^tests/data/
repos:
  - repo: https://gitee.com/openmmlab/mirrors-flake8
4
    rev: 5.0.4
Zaida Zhou's avatar
Zaida Zhou committed
5
6
    hooks:
      - id: flake8
tripleMu's avatar
tripleMu committed
7
8
  - repo: https://gitee.com/openmmlab/mirrors-isort
    rev: 5.11.5
Zaida Zhou's avatar
Zaida Zhou committed
9
10
11
    hooks:
      - id: isort
  - repo: https://gitee.com/openmmlab/mirrors-yapf
12
    rev: v0.32.0
Zaida Zhou's avatar
Zaida Zhou committed
13
14
15
    hooks:
      - id: yapf
  - repo: https://gitee.com/openmmlab/mirrors-pre-commit-hooks
16
    rev: v4.3.0
Zaida Zhou's avatar
Zaida Zhou committed
17
18
19
20
21
22
23
24
25
26
27
28
    hooks:
      - id: trailing-whitespace
      - id: check-yaml
      - id: end-of-file-fixer
      - id: requirements-txt-fixer
      - id: double-quote-string-fixer
      - id: check-merge-conflict
      - id: fix-encoding-pragma
        args: ["--remove"]
      - id: mixed-line-ending
        args: ["--fix=lf"]
  - repo: https://gitee.com/openmmlab/mirrors-codespell
29
    rev: v2.2.1
Zaida Zhou's avatar
Zaida Zhou committed
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
    hooks:
      - id: codespell
  - repo: https://gitee.com/openmmlab/mirrors-mdformat
    rev: 0.7.9
    hooks:
      - id: mdformat
        args: ["--number"]
        additional_dependencies:
          - mdformat-openmmlab
          - mdformat_frontmatter
          - linkify-it-py
  - repo: https://gitee.com/openmmlab/mirrors-docformatter
    rev: v1.3.1
    hooks:
      - id: docformatter
        args: ["--in-place", "--wrap-descriptions", "79"]
  - repo: https://github.com/asottile/pyupgrade
47
    rev: v3.0.0
Zaida Zhou's avatar
Zaida Zhou committed
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
    hooks:
      - id: pyupgrade
        args: ["--py36-plus"]
  - repo: https://gitee.com/openmmlab/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"]
  - repo: https://gitee.com/openmmlab/mirrors-mypy
    rev: v0.812
    hooks:
      - id: mypy
        exclude: |-
          (?x)(
              ^test
              | ^docs
          )
  # - 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)$