加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/sourcegraph/sourcegraph
克隆/下载
.pre-commit-config.yaml 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
exclude: (^.*\.snap$)|(^internal/database/.*\.json)|(^internal/database/.*\.md)|(^migrations/[^/]+/squashed\.sql)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
exclude: 'pnpm-lock.yaml'
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/keith/pre-commit-buildifier
rev: 5.0.1
hooks:
- id: buildifier
- id: buildifier-lint
- repo: local
hooks:
- id: check-tokens
name: check-tokens
description: 'Check for common tokens being committed'
entry: ./dev/check-tokens.sh
language: script
'types': [text]
args: []
require_serial: false
- id: shellcheck
name: shellcheck
description: 'Run shellcheck'
entry: ./dev/check/shellcheck.sh
language: script
# TODO: adapt shellcheck.sh to only operate on passed-in files,
# and fallback to git ls-files when empty
pass_filenames: false
files: '.*\.(sh|bash)'
stages: [pre-push]
- id: shfmt
name: shfmt
description: 'Run shfmt'
entry: ./dev/check/shfmt.sh
language: script
# TODO: adapt shfmt.sh to only operate on passed-in files,
# and fallback to git ls-files when empty
pass_filenames: false
files: '.*\.(sh|bash)'
stages: [pre-push]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化