Skip to content

Commit f723039

Browse files
committed
fix: gen proto logic
1 parent da60765 commit f723039

27 files changed

+1334
-1064
lines changed

.github/workflows/golangci-lint.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: golangci-lint
2+
on:
3+
push:
4+
pull_request:
5+
6+
jobs:
7+
golangci-lint:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: golangci-lint
12+
uses: golangci/golangci-lint-action@v2
13+
with:
14+
version: latest
15+
- name: Vet
16+
run: go vet -v ./...

.golangci.yml

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
run:
2+
skip-dirs:
3+
- bin
4+
- static
5+
- third_party
6+
- tests
7+
skip-dirs-use-default: true
8+
timeout: 5m
9+
linters:
10+
disable:
11+
- gochecknoglobals
12+
- funlen
13+
# 1.22+
14+
- wsl
15+
- godox
16+
- gocognit
17+
- nolintlint
18+
- testpackage
19+
- noctx
20+
- nlreturn
21+
- gosimple
22+
- gomnd
23+
- goerr113
24+
- exhaustive
25+
- nestif
26+
- stylecheck
27+
- godot
28+
- gofumpt
29+
- whitespace
30+
- unparam
31+
- gci
32+
- gochecknoinits
33+
enable:
34+
- asciicheck
35+
- bodyclose
36+
- deadcode
37+
- depguard
38+
- dogsled
39+
- dupl
40+
- errcheck
41+
- exportloopref
42+
- goconst
43+
- gocritic
44+
- gocyclo
45+
- gofmt
46+
- goheader
47+
- goimports
48+
- golint
49+
- gomodguard
50+
- goprintffuncname
51+
- gosec
52+
- govet
53+
- ineffassign
54+
- interfacer
55+
- lll
56+
- misspell
57+
- prealloc
58+
- rowserrcheck
59+
- scopelint
60+
- sqlclosecheck
61+
- staticcheck
62+
- structcheck
63+
- typecheck
64+
- unconvert
65+
- unused
66+
- varcheck
67+
68+
linters-settings:
69+
govet: # 对于linter govet,我们手动开启了它的某些扫描规则
70+
check-shadowing: true
71+
check-unreachable: true
72+
check-rangeloops: true
73+
check-copylocks: true
74+
lll:
75+
line-length: 140

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ test: ## Run test against code.
2929
.PHONY: gen-protoc
3030
gen-protoc: ## Run protoc command to generate pb code.
3131
# call gen_proto.sh
32-
./gen_proto.sh .
32+
./gen_proto.sh
3333

3434
.PHONY: tools-install
3535
tools-install: ## Install tools.

config/registry/v1/registry.pb.go

+91-91
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/registry/v1/registry.pb.validate.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/registry/v1/registry.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
syntax = "proto3";
22

33
package api.config.registry.v1;
4-
option go_package = "api/config/registry/v1;v1";
4+
option go_package = "config/registry/v1;v1";
55

66
import "google/protobuf/duration.proto";
77

0 commit comments

Comments
 (0)