Skip to content

Commit

Permalink
Fixup SDK's vet usage to use go vet with build tags (#2300)
Browse files Browse the repository at this point in the history
Updates the SDK's usage of vet to use go vet instead of go tool vet.
This allows the SDK to pass build tags and packages instead of just
folder paths to the tool.

Fixes SDK's CI test failure with Go Tip.
  • Loading branch information
jasdel authored Dec 4, 2018
1 parent 7cede15 commit 88864eb
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 41 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@ lint:
echo "$$lint"; \
if [ "$$lint" != "" ]; then exit 1; fi

SDK_BASE_FOLDERS=$(shell ls -d */ | grep -v vendor | grep -v awsmigrate)
GO_VET_CMD=go tool vet --all -shadow
SDK_BASE_FOLDERS=$(shell go list ./... | grep -v vendor | grep -v awsmigrate)

vet:
${GO_VET_CMD} ${SDK_BASE_FOLDERS}
@echo "go vet SDK packages"
@go vet -tags "example codegen integration" -all ${SDK_BASE_FOLDERS}

get-deps: get-deps-tests get-deps-x-tests get-deps-codegen get-deps-verify

Expand Down
3 changes: 0 additions & 3 deletions private/model/api/examples_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ func (builder defaultExamplesBuilder) BuildScalar(name, memName string, ref *Sha
default:
panic(fmt.Errorf("Unsupported scalar type: %v", reflect.TypeOf(v)))
}
return ""
}

func (builder defaultExamplesBuilder) BuildComplex(name, memName string, ref *ShapeRef, v map[string]interface{}) string {
Expand All @@ -180,8 +179,6 @@ func (builder defaultExamplesBuilder) BuildComplex(name, memName string, ref *Sh
default:
panic(fmt.Sprintf("Expected complex type but recieved %q", ref.Shape.Type))
}

return ""
}

func (builder defaultExamplesBuilder) GoType(ref *ShapeRef, elem bool) string {
Expand Down
1 change: 0 additions & 1 deletion private/model/api/passes.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ func (r *referenceResolver) resolveReference(ref *ShapeRef) {
shape, ok := r.API.Shapes[ref.ShapeName]
if !ok {
panic(fmt.Sprintf("unable resolve reference, %s", ref.ShapeName))
return
}

if ref.JSONValue {
Expand Down
34 changes: 0 additions & 34 deletions service/sqs/api_test.go

This file was deleted.

0 comments on commit 88864eb

Please sign in to comment.