代码拉取完成,页面将自动刷新
# ---
default_language_version:
# force all unspecified python hooks to run python3
python: python3
repos:
- repo: https://gitee.com/qiangge_666/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-case-conflict
# - id: check-executables-have-shebangs
# - id: check-json
- id: check-merge-conflict
# - id: check-toml
# - id: check-xml
# - id: debug-statements
- id: detect-aws-credentials
args:
- --allow-missing-credentials
- id: detect-private-key
- id: end-of-file-fixer
# exclude: files/(issue|motd)
- id: mixed-line-ending
args:
- --fix=lf
# - id: pretty-format-json
# args:
# - --autofix
# - id: requirements-txt-fixer
- id: trailing-whitespace
# Text file hooks
- repo: https://gitee.com/qiangge_666/markdownlint-cli
rev: v0.30.0
hooks:
- id: markdownlint
args:
- --config=.mdl_config.yaml
- repo: https://gitee.com/mirrors_pre-commit/mirrors-prettier
rev: v2.5.1
hooks:
- id: prettier
- repo: https://gitee.com/qiangge_666/mirror_yamllint
rev: v1.26.3
hooks:
- id: yamllint
args:
- --strict
# pre-commit hooks
# - repo: https://github.com/pre-commit/pre-commit
# rev: v2.15.0
# hooks:
# - id: validate_manifest
# Shell script hooks
- repo: https://gitee.com/qiangge_666/mirror_pre-commit-shfmt
rev: v0.0.2
hooks:
- id: shfmt
args:
# Indent by two spaces
- -i
- "2"
# Binary operators may start a line
- -bn
# Switch cases are indented
- -ci
# Redirect operators are followed by a space
- -sr
- repo: https://gitee.com/qiangge_666/mirror_pre-commit-shell
rev: 1.0.5
hooks:
- id: shell-lint
# Python hooks
# - repo: https://github.com/PyCQA/bandit
# rev: 1.7.0
# hooks:
# - id: bandit
# args:
# - --config=.bandit.yml
# - repo: https://gitee.com/mirrors_psf/black
# rev: 21.9b0
# hooks:
# - id: black
# - repo: https://gitlab.com/pycqa/flake8
# rev: 3.9.2
# hooks:
# - id: flake8
# additional_dependencies:
# - flake8-docstrings
# - repo: https://gitee.com/mirrors_PyCQA/isort
# rev: 5.9.3
# hooks:
# - id: isort
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.910-1
# hooks:
# - id: mypy
# - repo: https://gitee.com/mirrors_asottile/pyupgrade
# rev: v2.29.0
# hooks:
# - id: pyupgrade
# Ansible hooks
# - repo: https://gitee.com/qiangge_666/mirrors_ansible-lint
# rev: v5.0.2
# hooks:
# - id: ansible-lint
# # files: molecule/default/playbook.yml
# Terraform hooks
# - repo: https://github.com/antonbabenko/pre-commit-terraform
# rev: v1.52.0
# hooks:
# - id: terraform_fmt
# - id: terraform_validate
# Docker hooks
# - repo: https://github.com/IamTheFij/docker-pre-commit
# rev: v2.0.1
# hooks:
# - id: docker-compose-check
# Packer hooks
- repo: https://gitee.com/qiangge_666/mirrors_pre-commit-packer
rev: v0.0.2
hooks:
- id: packer_validate
# - id: packer_fmt
- repo: https://gitee.com/musicwood/pre-commit-hooks
rev: v1.3.4
hooks:
- id: clang-format
args: [--style=file, --i=true]
# - id: clang-tidy
# - id: oclint
# - id: uncrustify
# - id: cppcheck
# - id: cpplint
# - id: include-what-you-use
# repos:
# - repo: https://github.com/koalaman/shellcheck-precommit
# rev: v0.8.0
# hooks:
# - id: shellcheck
# args: ["--severity=warning"] # Optionally only show errors and warnings
- repo: local
hooks:
- id: cppcheck
name: cppcheck
entry: cppcheck
language: system
args:
[
--enable=all,
--suppress=unusedFunction,
--suppress=unmatchedSuppression,
--suppress=missingIncludeSystem,
--suppress=toomanyconfigs,
--suppress=noOperatorEq,
--suppress=copyCtorPointerCopying,
--suppress=noCopyConstructor,
--suppress=uninitMemberVar,
--suppress=useStlAlgorithm,
--suppress=ignoredReturnValue,
--suppress=ctuOneDefinitionRuleViolation,
--error-exitcode=1,
--language=c++,
]
files: \.(c|h|cpp)$
# --check-config,
# - repo: local
# hooks:
# # keep this before clang-tidy, it generates compile_commands.json for it.
# # requires the 'compiledb' tool, 'pip install compiledb'
# - id: compiledb
# name: compiledb
# entry: compiledb
# language: system
# args: [--overwrite, make, -n, -B]
# always_run: true
# require_serial: true
# pass_filenames: false
# - repo: https://github.com/Takishima/cmake-pre-commit-hooks
# rev: v1.5.2
# hooks:
# - id: cppcheck
# args: [
# -DBUILD_TESTING=ON,
# --win="-DCMAKE_CXX_COMPILER=cl.exe"
# --unix="-DCMAKE_CXX_COMPILER=g++-11",
# -Bbuild,
# ]
# - repo: https://github.com/pocc/pre-commit-hooks
# rev: v1.3.4
# hooks:
# - id: clang-tidy
# args: [-checks=clang-diagnostic-return-type]
# files: src/.*\.c
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。