File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 11.PHONY : help lint lint-fix
22
3- help : # # 显示帮助信息
4- @echo " 可用的 make 命令:"
5- @echo " make lint - 运行 golangci-lint 检查代码"
6- @echo " make lint-fix - 运行 golangci-lint 并自动修复问题"
7-
83lint : # # 运行 golangci-lint
94 @for dir in $$(find . -name "*.go" -type f -exec dirname {} \; | sort -u ) ; do \
105 echo " Linting $$ dir..." ; \
11- (cd $$ dir && golangci-lint run --timeout=5m) || true ; \
6+ (cd $$ dir && golangci-lint run --timeout=5m * .go ) || true ; \
127 done
138
149lint-fix : # # 运行 golangci-lint 并自动修复
1510 @for dir in $$(find . -name "*.go" -type f -exec dirname {} \; | sort -u ) ; do \
1611 echo " Linting and fixing $$ dir..." ; \
17- (cd $$ dir && golangci-lint run --fix --timeout=5m) || true ; \
12+ (cd $$ dir && golangci-lint run --fix --timeout=5m * .go ) || true ; \
1813 done
You can’t perform that action at this time.
0 commit comments