加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.pre-commit-config.yaml 1.65 KB
一键复制 编辑 原始数据 按行查看 历史
---
ci:
skip: [hadolint-docker]
repos:
# Autoupdate: Python code
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.0
hooks:
- id: pyupgrade
args: [--py39-plus]
# Autoformat: Python code
- repo: https://github.com/psf/black
rev: 22.1.0
hooks:
- id: black
args: [--target-version=py39]
# Check python code static typing
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.931
hooks:
- id: mypy
additional_dependencies: ["pytest", "types-requests", "types-tabulate"]
# Autoformat: YAML, JSON, Markdown, etc.
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.5.1
hooks:
- id: prettier
# Lint: Dockerfile
- repo: https://github.com/hadolint/hadolint.git
rev: v2.8.0
hooks:
- id: hadolint-docker
entry: hadolint/hadolint:v2.8.0 hadolint
# Lint: YAML
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.26.3
hooks:
- id: yamllint
args: ["-d {extends: relaxed, rules: {line-length: disable}}", "-s"]
files: \.(yaml|yml)$
# Lint: Bash scripts
- repo: https://github.com/openstack-dev/bashate.git
rev: 2.1.0
hooks:
- id: bashate
args: ["--ignore=E006"]
# Lint: Shell scripts
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.8.0.4
hooks:
- id: shellcheck
args: ["-x"]
# Lint: Python
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
# Lint: Markdown
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.31.0
hooks:
- id: markdownlint
args: ["--fix"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化