Skip to content

Make it easier to work with a multi-module repo #683

@sahidvelji

Description

@sahidvelji

Since this repo has multiple Go modules, it can be tedious to keep them all well-managed. For example, go mod tidy will need to be run in every module separately. To make this easier, I suggest adopting some of the Makefile targets that opentelemetry-go-contrib uses. See their Makefile.

For example, if you clone https://github.com/open-telemetry/opentelemetry-go-contrib
and then run make golangci-lint, you'll get the following output:

❯ make golangci-lint
golangci-lint .
0 issues.
golangci-lint ./bridges/otellogr
0 issues.
golangci-lint ./bridges/otellogrus
0 issues.
golangci-lint ./bridges/otelslog
0 issues.
golangci-lint ./bridges/otelzap
0 issues.
golangci-lint ./bridges/prometheus
0 issues.
golangci-lint ./detectors/aws/ec2
0 issues.
golangci-lint ./detectors/aws/ecs
0 issues.
golangci-lint ./detectors/aws/eks
0 issues.
golangci-lint ./detectors/aws/lambda
0 issues.
golangci-lint ./detectors/azure/azurevm
0 issues.
golangci-lint ./detectors/gcp
0 issues.
golangci-lint ./examples/dice/instrumented
0 issues.
golangci-lint ./examples/dice/uninstrumented
0 issues.
golangci-lint ./examples/namedtracer
0 issues.
golangci-lint ./examples/opencensus
0 issues.
golangci-lint ./examples/otel-collector
0 issues.
golangci-lint ./examples/passthrough
0 issues.
golangci-lint ./examples/prometheus
0 issues.
golangci-lint ./examples/zipkin
0 issues.
golangci-lint ./exporters/autoexport
0 issues.
golangci-lint ./instrumentation/github.com/aws/aws-lambda-go/otellambda
0 issues.
golangci-lint ./instrumentation/github.com/aws/aws-lambda-go/otellambda/example
0 issues.
golangci-lint ./instrumentation/github.com/aws/aws-lambda-go/otellambda/test
0 issues.

...

I suggest starting with just a few Makefile targets. I think go-mod-tidy, golangci-lint, golangci-lint-fix, and test targets are a great start.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions