Skip to content

Commit

Permalink
fix: gen proto logic
Browse files Browse the repository at this point in the history
  • Loading branch information
yushan committed Jun 1, 2022
1 parent 55eaebd commit 3600c4e
Show file tree
Hide file tree
Showing 27 changed files with 1,334 additions and 1,064 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: golangci-lint
on:
push:
pull_request:

jobs:
golangci-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: latest
- name: Vet
run: go vet -v ./...
75 changes: 75 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
run:
skip-dirs:
- bin
- static
- third_party
- tests
skip-dirs-use-default: true
timeout: 5m
linters:
disable:
- gochecknoglobals
- funlen
# 1.22+
- wsl
- godox
- gocognit
- nolintlint
- testpackage
- noctx
- nlreturn
- gosimple
- gomnd
- goerr113
- exhaustive
- nestif
- stylecheck
- godot
- gofumpt
- whitespace
- unparam
- gci
- gochecknoinits
enable:
- asciicheck
- bodyclose
- deadcode
- depguard
- dogsled
- dupl
- errcheck
- exportloopref
- goconst
- gocritic
- gocyclo
- gofmt
- goheader
- goimports
- golint
- gomodguard
- goprintffuncname
- gosec
- govet
- ineffassign
- interfacer
- lll
- misspell
- prealloc
- rowserrcheck
- scopelint
- sqlclosecheck
- staticcheck
- structcheck
- typecheck
- unconvert
- unused
- varcheck

linters-settings:
govet: # 对于linter govet,我们手动开启了它的某些扫描规则
check-shadowing: true
check-unreachable: true
check-rangeloops: true
check-copylocks: true
lll:
line-length: 140
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test: ## Run test against code.
.PHONY: gen-protoc
gen-protoc: ## Run protoc command to generate pb code.
# call gen_proto.sh
./gen_proto.sh .
./gen_proto.sh

.PHONY: tools-install
tools-install: ## Install tools.
Expand Down
182 changes: 91 additions & 91 deletions config/registry/v1/registry.pb.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config/registry/v1/registry.pb.validate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/registry/v1/registry.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";

package api.config.registry.v1;
option go_package = "api/config/registry/v1;v1";
option go_package = "config/registry/v1;v1";

import "google/protobuf/duration.proto";

Expand Down
Loading

0 comments on commit 3600c4e

Please sign in to comment.