我有一个大的回购,喜欢github.com/myusername/myrepo
现在,在该存储库中(出于超出此问题范围的原因),我初始化了以下模块:gogithub.com/myusername/myrepo/eck-user-mgmt
这是我的github.com/myusername/myrepo/eck-user-mgmt/.pre-commit-config.yaml
---
files: ^eck-user-mgmt/
repos:
- repo: git://github.com/dnephin/pre-commit-golang
rev: v0.4.0
hooks:
- id: go-fmt
- id: go-imports
- id: go-unit-tests
- id: go-mod-tidy
- id: golangci-lint
但是,没有发现任何文件/模块/任何内容go
▶ g add .pre-commit-config.yaml && pre-commit run
go fmt...............................................(no files to check)Skipped
go imports...........................................(no files to check)Skipped
go-unit-tests........................................(no files to check)Skipped
go-mod-tidy..........................................(no files to check)Skipped
golangci-lint........................................(no files to check)Skipped
这是从居住的地方运行的,即pre-commit-config.yaml~/work/myrepo/eck-user-mgmt
为什么?
p.s. 我知道这不是模块管理方面的最佳实践,我只想知道是否有办法在特定设置的上下文中使用make工作gopre-commitgo
婷婷同学_
侃侃无极
红颜莎娜
德玛西亚99
随时随地看视频慕课网APP
相关分类