| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 |
Pre-commit Setup
This directory provides one-click installation scripts for the repository
pre-commit hook. The hook runs pylint on staged Python files and
lizard on staged source files and markdownlint-cli2 on staged
Markdown files before a commit.
Files
install.sh— Linux and macOS installerinstall.ps1— PowerShell installer for Windowsinstall.bat— Command Prompt installer for Windowsrun_pylint.py— shared pylint entry used by pre-commitrun_lizard.py— shared lizard entry used by pre-commit.pre-commit-config.yaml— root pre-commit hook definition.markdownlint.jsonc— shared Markdown lint rules
Usage
Linux / macOS
bash scripts/pre-commit/install.sh
Windows PowerShell
powershell -ExecutionPolicy Bypass -File scripts/pre-commit/install.ps1
Windows CMD
scripts\pre-commit\install.bat
What It Does
- Ensures
pre-commitis installed. - Installs the repository git hook.
- Installs hook environments and dependencies declared in the root
.pre-commit-config.yaml. - Uses the root
.pre-commit-config.yamlto runpylint,lizard, andmarkdownlint-cli2.
Manual Verification
python -m pre_commit run --all-files