percona / mongodb_exporter

A Prometheus exporter for MongoDB including sharding, replication and storage engines
Apache License 2.0
1.13k stars 421 forks source link

linter doesn't run for forked repos #286

Open denisok opened 3 years ago

denisok commented 3 years ago

https://github.com/percona/mongodb_exporter/runs/2724195305?check_suite_focus=true

Run # use GITHUB_TOKEN because only it has access to GitHub Checks API
  # use GITHUB_TOKEN because only it has access to GitHub Checks API
  bin/golangci-lint run -c=.golangci-required.yml --out-format=line-number | env REVIEWDOG_GITHUB_API_TOKEN=*** bin/reviewdog -f=golangci-lint -level=error -reporter=github-pr-check
  bin/golangci-lint run -c=.golangci.yml --out-format=line-number | env REVIEWDOG_GITHUB_API_TOKEN=*** bin/reviewdog -f=golangci-lint -level=error -reporter=github-pr-review
  shell: /usr/bin/bash -e {0}
  env:
    GOROOT: /opt/hostedtoolcache/go/1.15.12/x64
reviewdog: This is Pull-Request from forked repository.
GitHub token doesn't have write permission of Check API, so reviewdog will
report results via logging command [1].
[1]: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions#logging-commands
reviewdog: Reporting results for "golangci-lint"
reviewdog: No results found for "golangci-lint". 0 results found outside diff.
reviewdog: This is Pull-Request from forked repository.
GitHub token doesn't have write permission of Review API, so reviewdog will
report results via logging command [1] and create annotations similar to
github-pr-check reporter as a fallback.
[1]: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions#logging-commands
level=warning msg="[runner] The linter 'golint' is deprecated (since v1.41.0) due to: The repository of the linter has been archived by the owner.  Replaced by revive."
level=warning msg="[runner] The linter 'interfacer' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner. "
level=warning msg="[runner] The linter 'scopelint' is deprecated (since v1.39.0) due to: The repository of the linter has been deprecated by the owner.  Replaced by exportloopref."
level=warning msg="[runner] The linter 'maligned' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner.  Replaced by govet 'fieldalignment'."
kanakagrawal commented 2 years ago

I've encountered a similar issue trying to run checks on my local setup. Here are the details (Code is from this commit - efaa8b9d5ab2f801c8a79b78f15e2b89e82d5977)-

root@db-master:~/mongodb_exporter# go version
go version go1.16.5 linux/amd64
root@db-master:~/mongodb_exporter# make check-license
exporter/debug.go
exporter/debug_test.go
exporter/secondary_lag_test.go
exporter/utils_test.go
exporter/v1_compatibility.go
exporter/v1_compatibility_test.go
main_test.go
tools/tools.go
Please update license header in those files.
exit status 1
Makefile:92: recipe for target 'check-license' failed
make: *** [check-license] Error 1

root@db-master:~/mongodb_exporter# make check
bin/golangci-lint run
WARN [runner] The linter 'interfacer' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner.  
WARN [runner] The linter 'golint' is deprecated (since v1.41.0) due to: The repository of the linter has been archived by the owner.  Replaced by revive. 
WARN [runner] The linter 'maligned' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner.  Replaced by govet 'fieldalignment'. 
WARN [runner] The linter 'scopelint' is deprecated (since v1.39.0) due to: The repository of the linter has been deprecated by the owner.  Replaced by exportloopref. 
internal/tu/testutils.go:74:9: AppName, Auth, AutoEncryptionOptions, Compressors, Dialer, DisableOCSPEndpointCheck, HeartbeatInterval, LocalThreshold, MaxConnIdleTime, MaxPoolSize, MinPoolSize, PoolMonitor, Monitor, ServerMonitor, ReadConcern, ReadPreference, Registry, ReplicaSet, RetryReads, RetryWrites, ServerSelectionTimeout, SocketTimeout, TLSConfig, WriteConcern, ZlibLevel, ZstdLevel, AuthenticateToAnything, Deployment are missing in ClientOptions (exhaustivestruct)
        co := &options.ClientOptions{
               ^
internal/tu/testutils.go:61:6: test helper function should start from t.Helper() (thelper)
func DefaultTestClient(ctx context.Context, t *testing.T) *mongo.Client {
     ^
internal/tu/testutils.go:99:15: error returned from external package is unwrapped: sig: func io/ioutil.ReadFile(filename string) ([]byte, error) (wrapcheck)
                return nil, err
                            ^
internal/tu/testutils.go:105:15: error returned from external package is unwrapped: sig: func encoding/json.Unmarshal(data []byte, v interface{}) error (wrapcheck)
                return nil, err
                            ^
main.go:70:3: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)
                fmt.Println("mongodb_exporter - MongoDB Prometheus exporter")
                ^
main.go:71:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)
                fmt.Printf("Version: %s\n", version)
                ^
main.go:72:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)
                fmt.Printf("Commit: %s\n", commit)
                ^
main.go:73:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)
                fmt.Printf("Build date: %s\n", buildDate)
                ^
main.go:38:18: struct of size 112 bytes could be of size 104 bytes (maligned)
type GlobalFlags struct {
                 ^
main.go:62:22: NoAppSummary, Summary, Tree, FlagsLast, Indenter, NoExpandSubcommands are missing in HelpOptions (exhaustivestruct)
                kong.ConfigureHelp(kong.HelpOptions{
                                   ^
main_test.go:10:10: DirectConnect, DiscoveringMode, Version are missing in GlobalFlags (exhaustivestruct)
        opts := GlobalFlags{
                ^
main_test.go:9:1: Function TestBuildExporter missing the call to method parallel (paralleltest)
func TestBuildExporter(t *testing.T) {
^
main.go:124:15: error returned from external package is unwrapped: sig: func github.com/percona/mongodb_exporter/exporter.New(opts *github.com/percona/mongodb_exporter/exporter.Opts) (*github.com/percona/mongodb_exporter/exporter.Exporter, error) (wrapcheck)
                return nil, err
                            ^
exporter/collstats_collector.go:43: Function 'Collect' is too long (68 > 60) (funlen)
func (d *collstatsCollector) Collect(ch chan<- prometheus.Metric) {
exporter/exporter.go:98: Function 'makeRegistry' is too long (64 > 60) (funlen)
func (e *Exporter) makeRegistry(ctx context.Context, client *mongo.Client, topologyInfo labelsGetter) *prometheus.Registry {
exporter/v1_compatibility.go:861: Function 'replSetMetrics' is too long (85 > 60) (funlen)
func replSetMetrics(m bson.M) []prometheus.Metric {
exporter/v1_compatibility.go:949: Function 'mongosMetrics' is too long (64 > 60) (funlen)
func mongosMetrics(ctx context.Context, client *mongo.Client, l *logrus.Logger) []prometheus.Metric {
exporter/secondary_lag_test.go:55: Function 'TestSecondaryLag' has too many statements (51 > 40) (funlen)
func TestSecondaryLag(t *testing.T) {
exporter/exporter.go:99: exporter/exporter.go:99: Line contains TODO/BUG/FIXME: "TODO: use NewPedanticRegistry when mongo..." (godox)
        // TODO: use NewPedanticRegistry when mongodb_exporter code fulfils its requirements (https://jira.percona.com/browse/PMM-6630).
exporter/topology_info.go:53: exporter/topology_info.go:53: Line contains TODO/BUG/FIXME: "TODO: with https://jira.percona.com/brow..." (godox)
        // TODO: with https://jira.percona.com/browse/PMM-6435, replace this client pointer
exporter/diagnostic_data_collector_test.go:71: exporter/diagnostic_data_collector_test.go:71: Line contains TODO/BUG/FIXME: "TODO: use NewPedanticRegistry when mongo..." (godox)
        // TODO: use NewPedanticRegistry when mongodb_exporter code fulfils its requirements (https://jira.percona.com/browse/PMM-6630).
exporter/general_collector.go:44:65: `log` can be `github.com/stretchr/testify/assert.TestingT` (interfacer)
func mongodbUpMetric(ctx context.Context, client *mongo.Client, log *logrus.Logger) prometheus.Metric {
                                                                ^
exporter/exporter.go:44:11: struct of size 120 bytes could be of size 112 bytes (maligned)
type Opts struct {
          ^
exporter/secondary_lag_test.go:39:11: struct of size 80 bytes could be of size 72 bytes (maligned)
        Settings struct {
                 ^
exporter/metrics.go:188:1: calculated cyclomatic complexity for function asFloat64 is 11, max is 10 (cyclop)
func asFloat64(value interface{}) (*float64, error) {
^
exporter/metrics.go:236:1: calculated cyclomatic complexity for function makeMetrics is 14, max is 10 (cyclop)
func makeMetrics(prefix string, m bson.M, labels map[string]string, compatibleMode bool) []prometheus.Metric {
^
exporter/replset_status_collector.go:52:15: type assertion on error will fail on wrapped errors. Use errors.As to check for specific errors (errorlint)
                if e, ok := err.(mongo.CommandError); ok {
                            ^
exporter/exporter.go:76:10: client, topologyInfo are missing in Exporter (exhaustivestruct)
        exp := &Exporter{
                ^
exporter/exporter.go:212:39: Registry, DisableCompression, MaxRequestsInFlight, Timeout, EnableOpenMetrics are missing in HandlerOpts (exhaustivestruct)
                h := promhttp.HandlerFor(gatherers, promhttp.HandlerOpts{
                                                    ^
exporter/topology_info.go:65:9: rw is missing in topologyInfo (exhaustivestruct)
        ti := &topologyInfo{
               ^
exporter/topology_info.go:128:8: SetName, Hosts, Msg are missing in MasterDoc (exhaustivestruct)
        md := proto.MasterDoc{}
              ^
exporter/v1_compatibility.go:1213:9: ID, Count are missing in ShardingChangelogSummary (exhaustivestruct)
                s := &ShardingChangelogSummary{}
                      ^
exporter/v1_compatibility.go:1265:17: Members is missing in databaseStatList (exhaustivestruct)
        dbStatList := &databaseStatList{}
                       ^
exporter/v1_compatibility.go:1273:15: rawStatus, Shards are missing in databaseStatus (exhaustivestruct)
                dbStatus := databaseStatus{}
                            ^
exporter/collstats_collector_test.go:56:8: ctx, compatibleMode, discoveringMode are missing in collstatsCollector (exhaustivestruct)
        c := &collstatsCollector{
              ^
exporter/diagnostic_data_collector_test.go:45:8: ctx, compatibleMode are missing in diagnosticDataCollector (exhaustivestruct)
        c := &diagnosticDataCollector{
              ^
exporter/diagnostic_data_collector_test.go:88:8: ctx is missing in diagnosticDataCollector (exhaustivestruct)
        c := &diagnosticDataCollector{
              ^
exporter/exporter_test.go:78:20: CompatibleMode, DiscoveringMode, DirectConnect, Path, WebListenAddress, IndexStatsCollections, CollStatsCollections, DisableDiagnosticData, DisableReplicasetStatus are missing in Opts (exhaustivestruct)
                exporterOpts := &Opts{
                                 ^
exporter/exporter_test.go:114:20: CompatibleMode, DiscoveringMode, DirectConnect, Path, WebListenAddress, IndexStatsCollections, CollStatsCollections, DisableDiagnosticData, DisableReplicasetStatus are missing in Opts (exhaustivestruct)
                exporterOpts := &Opts{
                                 ^
exporter/exporter_test.go:180:20: CompatibleMode, DiscoveringMode, DirectConnect, Path, WebListenAddress, IndexStatsCollections, CollStatsCollections, DisableDiagnosticData, DisableReplicasetStatus are missing in Opts (exhaustivestruct)
                exporterOpts := &Opts{
                                 ^
exporter/indexstats_collector_test.go:57:17: Background, ExpireAfterSeconds, Sparse, StorageEngine, Unique, Version, DefaultLanguage, LanguageOverride, TextVersion, Weights, SphereVersion, Bits, Max, Min, BucketSize, PartialFilterExpression, Collation, WildcardProjection, Hidden are missing in IndexOptions (exhaustivestruct)
                        }, Options: &options.IndexOptions{
                                     ^
exporter/indexstats_collector_test.go:65:8: ctx, discoveringMode are missing in indexstatsCollector (exhaustivestruct)
        c := &indexstatsCollector{
              ^
exporter/metrics_test.go:145:11: T, I are missing in Timestamp (exhaustivestruct)
                {value: primitive.Timestamp{}, wantVal: nil},
                        ^
exporter/metrics_test.go:183:9: help, ln, lv are missing in rawMetric (exhaustivestruct)
                        in: &rawMetric{
                             ^
exporter/metrics_test.go:198:9: help, ln, lv are missing in rawMetric (exhaustivestruct)
                        in: &rawMetric{
                             ^
exporter/replset_status_collector_test.go:40:8: compatibleMode is missing in replSetGetStatusCollector (exhaustivestruct)
        c := &replSetGetStatusCollector{
              ^
exporter/replset_status_collector_test.go:75:8: compatibleMode, logger are missing in replSetGetStatusCollector (exhaustivestruct)
        c := &replSetGetStatusCollector{
              ^
exporter/secondary_lag_test.go:124:13: Label, Gauge, Counter, Summary, Untyped, Histogram, TimestampMs, XXX_NoUnkeyedLiteral, XXX_unrecognized, XXX_sizecache are missing in Metric (exhaustivestruct)
        metric := &dto.Metric{}
                   ^
exporter/serverstatus_collector_test.go:40:8: compatibleMode is missing in serverStatusCollector (exhaustivestruct)
        c := &serverStatusCollector{
              ^
exporter/v1_compatibility_test.go:170:7: newName, labelConversions, labelValueConversions, suffixMapping are missing in conversion (exhaustivestruct)
        c := conversion{
             ^
exporter/v1_compatibility_test.go:90:2: S1021: should merge variable declaration with assignment on next line (gosimple)
        var metrics []prometheus.Metric
        ^
exporter/topology_info.go:70:2: variable 'err' is only used in the if-statement (exporter/topology_info.go:71:2); consider using short syntax (ifshort)
        err := ti.loadLabels(ctx)
        ^
exporter/collstats_collector.go:85:4: continue with no blank line before (nlreturn)
                        continue
                        ^
exporter/collstats_collector.go:91:4: continue with no blank line before (nlreturn)
                        continue
                        ^
exporter/debug.go:19:3: return with no blank line before (nlreturn)
                return
                ^
exporter/indexstats_collector.go:72:4: continue with no blank line before (nlreturn)
                        continue
                        ^
exporter/metrics.go:127:4: break with no blank line before (nlreturn)
                        break
                        ^
exporter/metrics.go:212:2: return with no blank line before (nlreturn)
        return &f, nil
        ^
exporter/metrics.go:217:2: return with no blank line before (nlreturn)
        return prometheus.NewConstMetric(d, rm.vt, rm.val, rm.lv...)
        ^
exporter/collstats_collector_test.go:34:1: Function TestCollStatsCollector missing the call to method parallel (paralleltest)
func TestCollStatsCollector(t *testing.T) {
^
exporter/debug_test.go:13:1: Function TestDebug missing the call to method parallel (paralleltest)
func TestDebug(t *testing.T) {
^
exporter/diagnostic_data_collector_test.go:37:1: Function TestDiagnosticDataCollector missing the call to method parallel (paralleltest)
func TestDiagnosticDataCollector(t *testing.T) {
^
exporter/diagnostic_data_collector_test.go:79:1: Function TestAllDiagnosticDataCollectorMetrics missing the call to method parallel (paralleltest)
func TestAllDiagnosticDataCollectorMetrics(t *testing.T) {
^
exporter/exporter_test.go:48:1: Function TestConnect missing the call to method parallel (paralleltest)
func TestConnect(t *testing.T) {
^
exporter/exporter_test.go:64:2: Function TestConnect has missing the call to method parallel in the test run (paralleltest)
        t.Run("Connect without SSL", func(t *testing.T) {
        ^
exporter/exporter_test.go:75:2: Function TestConnect has missing the call to method parallel in the test run (paralleltest)
        t.Run("Test per-request connection", func(t *testing.T) {
        ^
exporter/exporter_test.go:111:2: Function TestConnect has missing the call to method parallel in the test run (paralleltest)
        t.Run("Test global connection", func(t *testing.T) {
        ^
exporter/exporter_test.go:157:1: Function TestMongoS missing the call to method parallel (paralleltest)
func TestMongoS(t *testing.T) {
^
exporter/general_collector_test.go:34:1: Function TestGeneralCollector missing the call to method parallel (paralleltest)
func TestGeneralCollector(t *testing.T) {
^
exporter/indexstats_collector_test.go:38:1: Function TestIndexStatsCollector missing the call to method parallel (paralleltest)
func TestIndexStatsCollector(t *testing.T) {
^
exporter/indexstats_collector_test.go:97:1: Function TestSanitize missing the call to method parallel (paralleltest)
func TestSanitize(t *testing.T) {
^
exporter/indexstats_collector_test.go:98:2: Function TestSanitize has missing the call to method parallel in the test run (paralleltest)
        t.Run("With building", func(t *testing.T) {
        ^
exporter/indexstats_collector_test.go:129:2: Function TestSanitize has missing the call to method parallel in the test run (paralleltest)
        t.Run("Without building", func(t *testing.T) {
        ^
exporter/metrics_test.go:30:1: Function TestMetricName missing the call to method parallel (paralleltest)
func TestMetricName(t *testing.T) {
^
exporter/metrics_test.go:72:1: Function TestPrometeusize missing the call to method parallel (paralleltest)
func TestPrometeusize(t *testing.T) {
^
exporter/metrics_test.go:131:1: Function TestMakeRawMetric missing the call to method parallel (paralleltest)
func TestMakeRawMetric(t *testing.T) {
^
exporter/metrics_test.go:177:1: Function TestRawToCompatibleRawMetric missing the call to method parallel (paralleltest)
func TestRawToCompatibleRawMetric(t *testing.T) {
^
exporter/replset_status_collector_test.go:32:1: Function TestReplsetStatusCollector missing the call to method parallel (paralleltest)
func TestReplsetStatusCollector(t *testing.T) {
^
exporter/replset_status_collector_test.go:67:1: Function TestReplsetStatusCollectorNoSharding missing the call to method parallel (paralleltest)
func TestReplsetStatusCollectorNoSharding(t *testing.T) {
^
exporter/serverstatus_collector_test.go:32:1: Function TestServerStatusDataCollector missing the call to method parallel (paralleltest)
func TestServerStatusDataCollector(t *testing.T) {
^
exporter/topology_info_test.go:30:1: Function TestTopologyLabels missing the call to method parallel (paralleltest)
func TestTopologyLabels(t *testing.T) {
^
exporter/v1_compatibility_test.go:17:1: Function TestWalkTo missing the call to method parallel (paralleltest)
func TestWalkTo(t *testing.T) {
^
exporter/v1_compatibility_test.go:49:1: Function TestMakeLockMetric missing the call to method parallel (paralleltest)
func TestMakeLockMetric(t *testing.T) {
^
exporter/v1_compatibility_test.go:82:1: Function TestAddLocksMetrics missing the call to method parallel (paralleltest)
func TestAddLocksMetrics(t *testing.T) {
^
exporter/v1_compatibility_test.go:119:1: Function TestSumMetrics missing the call to method parallel (paralleltest)
func TestSumMetrics(t *testing.T) {
^
exporter/v1_compatibility_test.go:142:2: Range statement for test TestSumMetrics missing the call to method parallel in test Run (paralleltest)
        for _, tt := range tests {
        ^
exporter/v1_compatibility_test.go:160:1: Function TestCreateOldMetricFromNew missing the call to method parallel (paralleltest)
func TestCreateOldMetricFromNew(t *testing.T) {
^
exporter/exporter.go:234:15: error returned from external package is unwrapped: sig: func go.mongodb.org/mongo-driver/mongo.Connect(ctx context.Context, opts ...*go.mongodb.org/mongo-driver/mongo/options.ClientOptions) (*go.mongodb.org/mongo-driver/mongo.Client, error) (wrapcheck)
                return nil, err
                            ^
exporter/exporter.go:238:15: error returned from external package is unwrapped: sig: func (*go.mongodb.org/mongo-driver/mongo.Client).Ping(ctx context.Context, rp *go.mongodb.org/mongo-driver/mongo/readpref.ReadPref) error (wrapcheck)
                return nil, err
                            ^
exporter/topology_info.go:130:14: error returned from external package is unwrapped: sig: func (*go.mongodb.org/mongo-driver/mongo.SingleResult).Decode(v interface{}) error (wrapcheck)
                return "", err
                           ^
exporter/v1_compatibility.go:145:15: error returned from external package is unwrapped: sig: func github.com/prometheus/client_golang/prometheus.NewConstMetric(desc *github.com/prometheus/client_golang/prometheus.Desc, valueType github.com/prometheus/client_golang/prometheus.ValueType, value float64, labelValues ...string) (github.com/prometheus/client_golang/prometheus.Metric, error) (wrapcheck)
                return nil, err
                            ^
exporter/v1_compatibility.go:701:9: error returned from external package is unwrapped: sig: func github.com/prometheus/client_golang/prometheus.NewConstMetric(desc *github.com/prometheus/client_golang/prometheus.Desc, valueType github.com/prometheus/client_golang/prometheus.ValueType, value float64, labelValues ...string) (github.com/prometheus/client_golang/prometheus.Metric, error) (wrapcheck)
        return prometheus.NewConstMetric(d, prometheus.UntypedValue, *f, lv...)
               ^
exporter/v1_compatibility.go:833:15: error returned from external package is unwrapped: sig: func (*go.mongodb.org/mongo-driver/mongo.SingleResult).Err() error (wrapcheck)
                return nil, headRes.Err()
                            ^
exporter/v1_compatibility.go:837:15: error returned from external package is unwrapped: sig: func (*go.mongodb.org/mongo-driver/mongo.SingleResult).Decode(v interface{}) error (wrapcheck)
                return nil, err
                            ^
exporter/v1_compatibility.go:843:15: error returned from external package is unwrapped: sig: func (*go.mongodb.org/mongo-driver/mongo.SingleResult).Err() error (wrapcheck)
                return nil, tailRes.Err()
                            ^
exporter/v1_compatibility.go:847:15: error returned from external package is unwrapped: sig: func (*go.mongodb.org/mongo-driver/mongo.SingleResult).Decode(v interface{}) error (wrapcheck)
                return nil, err
                            ^
exporter/v1_compatibility.go:1019:15: error returned from external package is unwrapped: sig: func (*go.mongodb.org/mongo-driver/mongo.Collection).CountDocuments(ctx context.Context, filter interface{}, opts ...*go.mongodb.org/mongo-driver/mongo/options.CountOptions) (int64, error) (wrapcheck)
                return nil, err
                            ^
exporter/v1_compatibility.go:1033:15: error returned from external package is unwrapped: sig: func (*go.mongodb.org/mongo-driver/mongo.Collection).CountDocuments(ctx context.Context, filter interface{}, opts ...*go.mongodb.org/mongo-driver/mongo/options.CountOptions) (int64, error) (wrapcheck)
                return nil, err
                            ^
exporter/v1_compatibility.go:1048:15: error returned from external package is unwrapped: sig: func (*go.mongodb.org/mongo-driver/mongo.Collection).CountDocuments(ctx context.Context, filter interface{}, opts ...*go.mongodb.org/mongo-driver/mongo/options.CountOptions) (int64, error) (wrapcheck)
                return nil, err
                            ^
exporter/v1_compatibility.go:1124:15: error returned from external package is unwrapped: sig: func (*go.mongodb.org/mongo-driver/mongo.Collection).Aggregate(ctx context.Context, pipeline interface{}, opts ...*go.mongodb.org/mongo-driver/mongo/options.AggregateOptions) (*go.mongodb.org/mongo-driver/mongo.Cursor, error) (wrapcheck)
                return nil, err
                            ^
exporter/v1_compatibility.go:1129:15: error returned from external package is unwrapped: sig: func (*go.mongodb.org/mongo-driver/mongo.Cursor).All(ctx context.Context, results interface{}) error (wrapcheck)
                return nil, err
                            ^
exporter/v1_compatibility.go:1237:15: error returned from external package is unwrapped: sig: func (*go.mongodb.org/mongo-driver/mongo.Cursor).Err() error (wrapcheck)
                return nil, err
                            ^
Makefile:89: recipe for target 'check' failed
make: *** [check] Error 1