2021-04-14 21:22:37 +08:00
|
|
|
exclude: ^tests/data/
|
2020-05-21 21:21:43 +08:00
|
|
|
repos:
|
2022-02-17 02:17:20 +08:00
|
|
|
- repo: https://github.com/PyCQA/flake8
|
|
|
|
rev: 4.0.1
|
2020-05-21 21:21:43 +08:00
|
|
|
hooks:
|
|
|
|
- id: flake8
|
2022-02-17 02:17:20 +08:00
|
|
|
- repo: https://github.com/PyCQA/isort
|
2023-02-08 14:30:12 +08:00
|
|
|
rev: 5.11.5
|
2020-05-21 21:21:43 +08:00
|
|
|
hooks:
|
2021-04-14 21:22:37 +08:00
|
|
|
- id: isort
|
2020-05-21 21:21:43 +08:00
|
|
|
- repo: https://github.com/pre-commit/mirrors-yapf
|
2021-04-14 21:22:37 +08:00
|
|
|
rev: v0.30.0
|
2020-05-21 21:21:43 +08:00
|
|
|
hooks:
|
|
|
|
- id: yapf
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2021-04-14 21:22:37 +08:00
|
|
|
rev: v3.1.0
|
2020-05-21 21:21:43 +08:00
|
|
|
hooks:
|
|
|
|
- id: trailing-whitespace
|
|
|
|
- id: check-yaml
|
|
|
|
- id: end-of-file-fixer
|
|
|
|
- id: requirements-txt-fixer
|
|
|
|
- id: double-quote-string-fixer
|
2021-04-14 21:22:37 +08:00
|
|
|
- id: check-merge-conflict
|
2020-05-21 21:21:43 +08:00
|
|
|
- id: fix-encoding-pragma
|
|
|
|
args: ["--remove"]
|
2021-04-14 21:22:37 +08:00
|
|
|
- id: mixed-line-ending
|
|
|
|
args: ["--fix=lf"]
|
2022-06-02 15:22:01 +08:00
|
|
|
- repo: https://github.com/executablebooks/mdformat
|
|
|
|
rev: 0.7.9
|
|
|
|
hooks:
|
|
|
|
- id: mdformat
|
2022-11-21 18:21:48 +08:00
|
|
|
args: ["--number", "--table-width", "200", '--disable-escape', 'backslash', '--disable-escape', 'link-enclosure']
|
2022-06-02 15:22:01 +08:00
|
|
|
additional_dependencies:
|
2022-11-08 11:09:51 +08:00
|
|
|
- "mdformat-openmmlab>=0.0.4"
|
2022-06-02 15:22:01 +08:00
|
|
|
- mdformat_frontmatter
|
|
|
|
- linkify-it-py
|
2021-10-13 14:33:07 +08:00
|
|
|
- repo: https://github.com/codespell-project/codespell
|
|
|
|
rev: v2.1.0
|
|
|
|
hooks:
|
|
|
|
- id: codespell
|
2021-04-14 21:22:37 +08:00
|
|
|
- repo: https://github.com/myint/docformatter
|
|
|
|
rev: v1.3.1
|
|
|
|
hooks:
|
|
|
|
- id: docformatter
|
|
|
|
args: ["--in-place", "--wrap-descriptions", "79"]
|
2022-02-25 11:48:07 +08:00
|
|
|
- repo: https://github.com/open-mmlab/pre-commit-hooks
|
2022-09-20 15:50:21 +08:00
|
|
|
rev: v0.4.0
|
2022-02-25 11:48:07 +08:00
|
|
|
hooks:
|
|
|
|
- id: check-copyright
|
2023-02-28 15:59:17 +08:00
|
|
|
args: ["mmpretrain", "tests", "demo", "tools", "--excludes", "mmpretrain/.mim/", "--ignore-file-not-found-error"]
|
2023-01-10 10:06:56 +08:00
|
|
|
- repo: local
|
|
|
|
hooks:
|
|
|
|
- id: metafile
|
2023-02-23 11:17:16 +08:00
|
|
|
args: ['--skip', 'flops-param']
|
2023-01-10 10:06:56 +08:00
|
|
|
name: metafile
|
|
|
|
description: Check the format of metafile
|
|
|
|
entry: python .dev_scripts/check_metafile.py
|
|
|
|
language: python
|
|
|
|
files: (metafile)\.(yml)$
|
|
|
|
additional_dependencies:
|
|
|
|
- modelindex
|
2021-04-14 21:22:37 +08:00
|
|
|
# - 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)$
|