census-ecosystem / opencensus-go-exporter-stackdriver

OpenCensus Go exporter for Stackdriver Monitoring and Trace
Apache License 2.0
67 stars 79 forks source link

Use GitHub Actions and golangci-lint #310

Closed lucacome closed 1 year ago

lucacome commented 1 year ago

golint was removed because it's deprecated. Replaced with revive

dashpole commented 1 year ago

/gcbrun

dashpole commented 1 year ago

/gcbrun

lucacome commented 1 year ago

Not sure how to move the other steps to GitHub...I tried and I think it was missing some credentials (see https://github.com/census-ecosystem/opencensus-go-exporter-stackdriver/actions/runs/3850375522/jobs/6560448274) but I'm not sure why it's failing in Cloud Build since I can't see the logs 😭

dashpole commented 1 year ago

go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
# github.com/Abirdcfly/dupword
/go/pkg/mod/github.com/!abirdcfly/dupword@v0.0.7/dupword.go:129:25: undefined: strings.Cut
note: module requires Go 1.19
# golang.org/x/exp/constraints
/go/pkg/mod/golang.org/x/exp@v0.0.0-20220722155223-a9213eeb770e/constraints/constraints.go:13:2: syntax error: unexpected ~, expecting method or interface name
/go/pkg/mod/golang.org/x/exp@v0.0.0-20220722155223-a9213eeb770e/constraints/constraints.go:20:2: syntax error: unexpected ~, expecting method or interface name
/go/pkg/mod/golang.org/x/exp@v0.0.0-20220722155223-a9213eeb770e/constraints/constraints.go:27:9: syntax error: unexpected |, expecting semicolon or newline or }
/go/pkg/mod/golang.org/x/exp@v0.0.0-20220722155223-a9213eeb770e/constraints/constraints.go:34:2: syntax error: unexpected ~, expecting method or interface name
/go/pkg/mod/golang.org/x/exp@v0.0.0-20220722155223-a9213eeb770e/constraints/constraints.go:41:2: syntax error: unexpected ~, expecting method or interface name
/go/pkg/mod/golang.org/x/exp@v0.0.0-20220722155223-a9213eeb770e/constraints/constraints.go:49:10: syntax error: unexpected |, expecting semicolon or newline or }
note: module requires Go 1.18
# github.com/golangci/gofmt/gofmt
/go/pkg/mod/github.com/golangci/gofmt@v0.0.0-20220901101216-f2edd75033f2/gofmt/gofmt.go:195:49: undefined: any
/go/pkg/mod/github.com/golangci/gofmt@v0.0.0-20220901101216-f2edd75033f2/gofmt/rewrite.go:295:7: undefined: reflect.Pointer
note: module requires Go 1.18
# github.com/golangci/golangci-lint/pkg/golinters/goanalysis
/go/pkg/mod/github.com/golangci/golangci-lint@v1.50.1/pkg/golinters/goanalysis/runner_loadingpackage.go:126:3: unknown field 'Instances' in struct literal of type types.Info
note: module requires Go 1.19
# github.com/sashamelentyev/usestdlibvars/pkg/analyzer/internal/mapping
/go/pkg/mod/github.com/sashamelentyev/usestdlibvars@v1.20.0/pkg/analyzer/internal/mapping/mapping.go:199:15: constant.Bool.String undefined (type constant.Kind has no field or method String)
/go/pkg/mod/github.com/sashamelentyev/usestdlibvars@v1.20.0/pkg/analyzer/internal/mapping/mapping.go:200:17: constant.String.String undefined (type constant.Kind has no field or method String)
/go/pkg/mod/github.com/sashamelentyev/usestdlibvars@v1.20.0/pkg/analyzer/internal/mapping/mapping.go:201:14: constant.Int.String undefined (type constant.Kind has no field or method String)
/go/pkg/mod/github.com/sashamelentyev/usestdlibvars@v1.20.0/pkg/analyzer/internal/mapping/mapping.go:202:16: constant.Float.String undefined (type constant.Kind has no field or method String)
/go/pkg/mod/github.com/sashamelentyev/usestdlibvars@v1.20.0/pkg/analyzer/internal/mapping/mapping.go:203:18: constant.Complex.String undefined (type constant.Kind has no field or method String)
note: module requires Go 1.19
# github.com/timonwong/loggercheck/internal/rules
/go/pkg/mod/github.com/timonwong/loggercheck@v0.9.3/internal/rules/rules.go:67:25: recvNamed.TypeParams undefined (type *types.Named has no field or method TypeParams)
note: module requires Go 1.18
# mvdan.cc/gofumpt/internal/version
/go/pkg/mod/mvdan.cc/gofumpt@v0.4.0/internal/version/version.go:65:15: undefined: debug.BuildSetting
/go/pkg/mod/mvdan.cc/gofumpt@v0.4.0/internal/version/version.go:69:30: info.Settings undefined (type *debug.BuildInfo has no field or method Settings)
/go/pkg/mod/mvdan.cc/gofumpt@v0.4.0/internal/version/version.go:74:30: info.Settings undefined (type *debug.BuildInfo has no field or method Settings)
note: module requires Go 1.18
lucacome commented 1 year ago

I guess we need to update to 1.19? 🤔 At least in Cloud Build...

dashpole commented 1 year ago

Sure. Feel free to bump it here: https://github.com/census-ecosystem/opencensus-go-exporter-stackdriver/blob/master/cloudbuild.yaml#L2

dashpole commented 1 year ago

/gcbrun

lucacome commented 1 year ago

looks like it's good to merge?