- 将所有trustlog-sdk文件移动到trustlog/go-trustlog/目录 - 更新README中所有import路径从trustlog-sdk改为go-trustlog - 更新cookiecutter配置文件中的项目名称 - 更新根目录.lefthook.yml以引用新位置的配置 - 添加go.sum文件到版本控制 - 删除过时的示例文件 这次重构与trustlog-server保持一致的目录结构, 为未来支持多语言SDK(Python、Java等)预留空间。
40 lines
1.3 KiB
YAML
40 lines
1.3 KiB
YAML
default_stages: [commit, push]
|
|
fail_fast: true # stop running hooks at the first failure
|
|
minimum_pre_commit_version: 4.2.0
|
|
|
|
exclude: |
|
|
(?x)(
|
|
cookiecutter-config-file.yml|
|
|
.cruft.json
|
|
)
|
|
|
|
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v5.0.0
|
|
hooks:
|
|
# Verify syntax
|
|
- id: check-yaml
|
|
- id: check-json
|
|
- id: check-xml
|
|
|
|
# Checkers
|
|
- id: check-merge-conflict # check for merge conflict string
|
|
- id: detect-private-key # check for existence of private keys
|
|
|
|
# Implicit minor corrections to files
|
|
- id: end-of-file-fixer # ensure all files end with a new line
|
|
- id: trailing-whitespace # trim trailing whitespaces
|
|
|
|
# Good practices for executables/scripts
|
|
- id: check-executables-have-shebangs # non-binary executables have shebang
|
|
- id: check-shebang-scripts-are-executable # verify shebang scripts are executable
|
|
|
|
# Pretty format JSON files implicitly
|
|
- id: pretty-format-json
|
|
args: ["--autofix"]
|
|
|
|
# Debatable -- for most projects adding files larger than 10 MB is likely to be
|
|
# a mistake instead of a requirement. Remove this if needed
|
|
- id: check-added-large-files # fails if a file larger than 10 MB exists
|
|
args: ["--maxkb=10240", "--enforce-all"]
|