pre-commit 可以与 golangci-lint 集成,用于在每次提交代码前自动执行 Go 代码检查。 pre-commit 是一个流行的开源工具,用于在代码提交之前执行一系列检查和测试。通过集成 pre-commit 和 golangci-lint,可以在每次提交 Go 代码时自动运行静态代码检查,确保代码质量。 安装pre-commit 首先,确保系统上已经安装了 Py...
golangci-lint检查函数行数的规则在哪设置? 最近代码规范很烦人。要求一个函数不能超过80行。只能在git pre-commit钩子上检查下了。 这里使用golangci-lint,里面包含了funlen检查器 config.yaml 代码语言:javascript 代码运行次数:0 运行 AI代码解释 linters-settings: funlen: lines: 80 statements: 40 .git/...
ci: update golangci-lint, pre-commit, use global makelib … 6a68aad TylerGillson requested a review from a team as a code owner June 27, 2024 19:49 TylerGillson requested a review from ahmad-ibra June 27, 2024 19:49 TylerGillson added 2 commits June 27, 2024 13:53 chore...
Golangci lint has had a major update which makes the old config invalid. I updated the config usinghttps://golangci-lint.run/product/migration-guide/, this also made the linters complain about some things which i then also adapted. Ive also noticed that after chaning the pre commit workfl...
我正在尝试使用 github 操作中与 golang 相关的一些挂钩运行 pre-commit.com 脚本。似乎测试环境缺少一些工具来执行 go-imports 和 golangci-lint。我已经在预提交步骤之前添加了在环境中设置所需工具的步骤,但这没有帮助。.pre-commit-config.yaml:repos:- repo: https://github.com/dnephin/pre-commit-go...
changed in 2.17.0: previously go get ./... was used new in 3.0.0: pre-commit will bootstrap go if it is not present. language: golang also now supports language_version Support: golang hooks are known to work on any system which has go installed. It has been tested on linux, mac...
new in 3.0.0: pre-commit will bootstrapgoif it is not present.language: golangalso now supportslanguage_version Support:golang hooks are known to work on any system which has go installed. It has been tested on linux, macOS, and windows. ...
new in 3.0.0: pre-commit will bootstrapgoif it is not present.language: golangalso now supportslanguage_version Support:golang hooks are known to work on any system which has go installed. It has been tested on linux, macOS, and windows. ...
- repo: git://github.com/joker8023/pre-commit-golang rev: master hooks: - id: go-fmt - id: go-vet - id: go-lint - id: go-imports - id: go-cyclo args: [-over=15] - id: validate-toml - id: no-go-testing - id: gometalinter - id: golangci-lint - id: go-critic - ...
df459aea· Merge branch 'golangci-lint' into 'main' · 1 year ago Release: v0.0.3 v0.0.3 Unverified Download v0.0.2 855fdc28· chore: update to latest Go version and golangci-lint · 1 year ago Release: v0.0.2 v0.0.2 Unverified Download v0.0.1 a424b2b2· feat...