mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 14:07:02 +09:00
go vet
This commit is contained in:
parent
3c611239b9
commit
da4a43d5a0
5 changed files with 7 additions and 5 deletions
2
.github/workflows/coverage.yml
vendored
2
.github/workflows/coverage.yml
vendored
|
@ -14,7 +14,7 @@ jobs:
|
||||||
|
|
||||||
- name: Vet
|
- name: Vet
|
||||||
run: |
|
run: |
|
||||||
go vet ./...
|
make vet
|
||||||
- name: Unit tests
|
- name: Unit tests
|
||||||
run: |
|
run: |
|
||||||
sudo make test-coverage
|
sudo make test-coverage
|
||||||
|
|
5
Makefile
5
Makefile
|
@ -1,4 +1,4 @@
|
||||||
.PHONY: proto test test-coverage
|
.PHONY: proto test test-coverage vet
|
||||||
export GOPRIVATE=github.com/anytypeio
|
export GOPRIVATE=github.com/anytypeio
|
||||||
|
|
||||||
proto:
|
proto:
|
||||||
|
@ -16,6 +16,9 @@ proto:
|
||||||
$(GOGO_START) protoc --gogofaster_out=$(PKGMAP):. --go-drpc_out=protolib=github.com/gogo/protobuf:. commonspace/spacesyncproto/protos/*.proto
|
$(GOGO_START) protoc --gogofaster_out=$(PKGMAP):. --go-drpc_out=protolib=github.com/gogo/protobuf:. commonspace/spacesyncproto/protos/*.proto
|
||||||
$(GOGO_START) protoc --gogofaster_out=$(PKGMAP):. --go-drpc_out=protolib=github.com/gogo/protobuf:. commonfile/fileproto/protos/*.proto
|
$(GOGO_START) protoc --gogofaster_out=$(PKGMAP):. --go-drpc_out=protolib=github.com/gogo/protobuf:. commonfile/fileproto/protos/*.proto
|
||||||
|
|
||||||
|
vet:
|
||||||
|
go vet ./...
|
||||||
|
|
||||||
test:
|
test:
|
||||||
go test ./... --cover
|
go test ./... --cover
|
||||||
|
|
||||||
|
|
|
@ -395,7 +395,6 @@ func (ot *objectTree) addRawChanges(ctx context.Context, changesPayload RawChang
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ot *objectTree) createAddResult(oldHeads []string, mode Mode, treeChangesAdded []*Change, rawChanges []*treechangeproto.RawTreeChangeWithId) (addResult AddResult, err error) {
|
func (ot *objectTree) createAddResult(oldHeads []string, mode Mode, treeChangesAdded []*Change, rawChanges []*treechangeproto.RawTreeChangeWithId) (addResult AddResult, err error) {
|
||||||
|
|
|
@ -133,7 +133,7 @@ func (st *deletionState) CreateDeleteChange(id string, isSnapshot bool) (res []b
|
||||||
}
|
}
|
||||||
change := &spacesyncproto.SettingsData{
|
change := &spacesyncproto.SettingsData{
|
||||||
Content: []*spacesyncproto.SpaceSettingsContent{
|
Content: []*spacesyncproto.SpaceSettingsContent{
|
||||||
{content},
|
{Value: content},
|
||||||
},
|
},
|
||||||
Snapshot: nil,
|
Snapshot: nil,
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ func TestProvider_ProcessChange(t *testing.T) {
|
||||||
ch := &objecttree.Change{}
|
ch := &objecttree.Change{}
|
||||||
ch.Model = &spacesyncproto.SettingsData{
|
ch.Model = &spacesyncproto.SettingsData{
|
||||||
Content: []*spacesyncproto.SpaceSettingsContent{
|
Content: []*spacesyncproto.SpaceSettingsContent{
|
||||||
{&spacesyncproto.SpaceSettingsContent_ObjectDelete{
|
{Value: &spacesyncproto.SpaceSettingsContent_ObjectDelete{
|
||||||
ObjectDelete: &spacesyncproto.ObjectDelete{Id: "id1"},
|
ObjectDelete: &spacesyncproto.ObjectDelete{Id: "id1"},
|
||||||
}},
|
}},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue