1 Star 0 Fork 0

Damien Nguyen/lukas-c-pre-commit-hooks-mirror

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.pre-commit-config.yaml 2.57 KB
一键复制 编辑 原始数据 按行查看 历史
---
exclude: ^(\.[^/]*cache(__)?/.*|(.*/)?\.coverage)$
repos:
# Perform Markdown formatting before other hooks "fixing" line endings:
# PROBLEM: it alters the .md file permissions from 644 to 600 :(
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16
hooks:
- id: mdformat
name: Format Markdown
entry: mdformat # Executable to run, with fixed options
language: python
types: [markdown]
args: [--wrap, '75', --number]
additional_dependencies:
- mdformat-toc
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.0
hooks:
- id: forbid-crlf
- id: remove-crlf
- id: forbid-tabs
exclude: tests/resources/main.*_with_license.cpp
- id: remove-tabs
exclude: tests/resources/main.*_with_license.cpp
- id: chmod
args: ['644']
exclude: (\.md$|^tests/resources/.*shebang)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
files: ''
exclude: tests/resources/main.*_with_license.cpp
- id: check-yaml
- id: check-merge-conflict
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
args:
- --py37-plus
exclude: ^tests/resources/.*
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
exclude: ^tests/resources/
- repo: https://github.com/Lucas-C/pre-commit-hooks-bandit
rev: v1.0.6
hooks:
- id: python-bandit-vulnerability-check
args: [--skip, 'B101', --recursive, .]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.1.1
hooks:
- id: mypy
args:
- --ignore-missing-imports
- --install-types
- --non-interactive
- --check-untyped-defs
- --show-error-codes
- --show-error-context
- repo: local
hooks:
- id: pylint
name: pylint
# 3x faster than the official pylint hook, and has no issue with imports
# (tested with: time pre-commit run pylint --all-files)
language: system
entry: pylint
files: \.py$
exclude: ^tests/resources/.*(init_with_license|todo)
- id: pytest
name: pytest
language: python
additional_dependencies: [pytest, pytest-cov, coverage, rapidfuzz]
entry: pytest -sv
require_serial: true
pass_filenames: false
files: \.py$
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dnguyen/lukas-c-pre-commit-hooks-mirror.git
[email protected]:dnguyen/lukas-c-pre-commit-hooks-mirror.git
dnguyen
lukas-c-pre-commit-hooks-mirror
lukas-c-pre-commit-hooks-mirror
master

搜索帮助