From 645789254d12976e9ca2906384067815e83b2399 Mon Sep 17 00:00:00 2001 From: suyiiyii Date: Fri, 16 Aug 2024 21:39:56 +0800 Subject: [PATCH] =?UTF-8?q?feat(pre-commit):=20=E6=B7=BB=E5=8A=A0=E9=A2=9D?= =?UTF-8?q?=E5=A4=96=E7=9A=84hooks=E5=92=8Cshebangs=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加了检查文件夹大小写冲突、合并冲突和可执行文件shebangs的预提交hooks。这确保了提交的文件在所有平台上都能正常工作,并遵循项目的编码风格。此外,实现了对可执行文件的shebangs进行自动修复的支持。 --- .pre-commit-config.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 23fb352..8707a91 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,12 +6,14 @@ repos: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace + - id: check-case-conflict + - id: check-merge-conflict + - id: check-executables-have-shebangs + args: + - --autofix - repo: https://github.com/gherynos/pre-commit-java rev: v0.5.4 hooks: - id: pmd - exclude: /test/ - id: cpd - exclude: /test/ - id: checkstyle - exclude: /test/ \ No newline at end of file