Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to Go 1.21, Updates linter, updates workflows, adds sarama 1.42.1 #3251

Merged
merged 8 commits into from
Nov 29, 2023

Conversation

berndverst
Copy link
Member

@berndverst berndverst commented Nov 28, 2023

Description

  • Switches to Go 1.21
  • Golangci-lint to 1.55.2
  • Adds sarama upgrade from 1.12.2 patch release
  • Updates workflows

Signed-off-by: Bernd Verst <github@bernd.dev>
@berndverst berndverst requested review from a team as code owners November 28, 2023 03:18
Signed-off-by: Bernd Verst <github@bernd.dev>
Signed-off-by: Bernd Verst <github@bernd.dev>
@berndverst berndverst changed the title Switch to Go 1.21, updates workflows, adds sarama 1.42.1 Switch to Go 1.21, Updates linter, updates workflows, adds sarama 1.42.1 Nov 28, 2023
@berndverst
Copy link
Member Author

state/mysql/mysql.go:512:11                                                          gosec        G202: SQL string concatenation
state/mysql/mysql.go:671:10                                                          gosec        G202: SQL string concatenation
state/sqlite/sqlite_dbaccess.go:157:10                                               gosec        G202: SQL string concatenation
common/component/kafka/metadata_test.go:31:2                                         gosec        G101: Potential hardcoded credentials: RSA private key
common/component/azure/servicebus/message_pubsub_test.go:75:52                       gosec        G601: Implicit memory aliasing in for loop.
middleware/http/sentinel/middleware_test.go:130:38                                   gosec        G601: Implicit memory aliasing in for loop.
bindings/kubemq/kubemq.go:111:6                                                      protogetter  avoid direct access to proto field result.Results[0].IsError, use result.Results[0].GetIsError() instead
bindings/kubemq/kubemq.go:112:62                                                     protogetter  avoid direct access to proto field result.Results[0].Error, use result.Results[0].GetError() instead
state/etcd/schema.go:84:5                                                            protogetter  avoid direct access to proto field value.Ttl, use value.GetTtl() instead
state/etcd/schema.go:86:39                                                           protogetter  avoid direct access to proto field value.Ts.AsTime(), use value.GetTs().AsTime() instead
state/etcd/schema.go:90:9                                                            protogetter  avoid direct access to proto field value.Data, use value.GetData() instead
secretstores/gcp/secretmanager/secretmanager.go:173:19                               protogetter  avoid direct access to proto field result.Payload.Data, use result.GetPayload().GetData() instead
metadata/utils_test.go:115:37                                                        tagalign     tag is not aligned, should be: mapstructure:"pubsub_only_property"        mdonly:"pubsub"
metadata/utils_test.go:116:37                                                        tagalign     tag is not aligned, should be: mapstructure:"binding_only_property"       mdonly:"bindings"
metadata/utils_test.go:122:37                                                        tagalign     tag is not aligned, should be: mapstructure:"aliased"              mdaliases:"another,name"
metadata/utils_test.go:123:37                                                        tagalign     tag is not aligned, should be: mapstructure:"ignored"              mdignore:"true"
bindings/alicloud/oss/oss.go:38:21                                                   tagalign     tag is not aligned, should be: json:"endpoint"    mapstructure:"endpoint"
bindings/alicloud/oss/oss.go:40:21                                                   tagalign     tag is not aligned, should be: json:"accessKey"   mapstructure:"accessKey"
bindings/alicloud/oss/oss.go:41:21                                                   tagalign     tag is not aligned, should be: json:"bucket"      mapstructure:"bucket"
common/authentication/sqlite/metadata.go:37:33                                       tagalign     tag is not aligned, should be: mapstructure:"timeout"          mapstructurealiases:"timeoutInSeconds"
state/sqlite/sqlite_metadata.go:36:34                                                tagalign     tag is not aligned, should be: mapstructure:"cleanupInterval"   mapstructurealiases:"cleanupIntervalInSeconds"
nameresolution/sqlite/sqlite_metadata.go:46:34                                       tagalign     tag is not aligned, should be: mapstructure:"cleanupInterval"   mapstructurealiases:"cleanupIntervalInSeconds"
middleware/http/oauth2clientcredentials/oauth2clientcredentials_middleware.go:39:29  tagalign     tag is not aligned, should be: json:"clientID"                      mapstructure:"clientID"
middleware/http/oauth2clientcredentials/oauth2clientcredentials_middleware.go:40:29  tagalign     tag is not aligned, should be: json:"clientSecret"                  mapstructure:"clientSecret"
middleware/http/oauth2clientcredentials/oauth2clientcredentials_middleware.go:41:29  tagalign     tag is not aligned, should be: json:"scopes"                        mapstructure:"scopes"
middleware/http/oauth2clientcredentials/oauth2clientcredentials_middleware.go:42:29  tagalign     tag is not aligned, should be: json:"tokenURL"                      mapstructure:"tokenURL"
middleware/http/oauth2clientcredentials/oauth2clientcredentials_middleware.go:43:29  tagalign     tag is not aligned, should be: json:"headerName"                    mapstructure:"headerName"
middleware/http/oauth2clientcredentials/oauth2clientcredentials_middleware.go:45:29  tagalign     tag is not aligned, should be: json:"authStyle"                     mapstructure:"authStyle"
middleware/http/oauth2/oauth2_middleware.go:37:24                                    tagalign     tag is not aligned, should be: json:"clientID"       mapstructure:"clientID"
middleware/http/oauth2/oauth2_middleware.go:38:24                                    tagalign     tag is not aligned, should be: json:"clientSecret"   mapstructure:"clientSecret"
middleware/http/oauth2/oauth2_middleware.go:39:24                                    tagalign     tag is not aligned, should be: json:"scopes"         mapstructure:"scopes"
middleware/http/oauth2/oauth2_middleware.go:40:24                                    tagalign     tag is not aligned, should be: json:"authURL"        mapstructure:"authURL"
middleware/http/oauth2/oauth2_middleware.go:41:24                                    tagalign     tag is not aligned, should be: json:"tokenURL"       mapstructure:"tokenURL"
middleware/http/oauth2/oauth2_middleware.go:43:24                                    tagalign     tag is not aligned, should be: json:"redirectURL"    mapstructure:"redirectURL"
middleware/http/oauth2/oauth2_middleware.go:44:24                                    tagalign     tag is not aligned, should be: json:"forceHTTPS"     mapstructure:"forceHTTPS"
bindings/alicloud/sls/sls.go:26:25                                                   tagalign     tag is not aligned, should be: json:"endpoint"        mapstructure:"endpoint"
bindings/alicloud/sls/sls.go:27:25                                                   tagalign     tag is not aligned, should be: json:"accessKeyID"     mapstructure:"accessKeyID"
state/rethinkdb/rethinkdb.go:56:14                                                   tagalign     tag is not aligned, should be: json:"id"             rethinkdb:"id"
state/rethinkdb/rethinkdb.go:57:14                                                   tagalign     tag is not aligned, should be: json:"timestamp"      rethinkdb:"timestamp"
pubsub/mqtt3/metadata.go:29:30                                                       tagalign     tag is not aligned, should be: mapstructure:"consumerID"   mdignore:"true"
pubsub/rabbitmq/metadata.go:31:46                                                    tagalign     tag is not aligned, should be: mapstructure:"consumerID"           mdignore:"true"
bindings/alicloud/tablestore/tablestore.go:44:22                                     tagalign     tag is not aligned, should be: json:"endpoint"     mapstructure:"endpoint"
bindings/alicloud/tablestore/tablestore.go:45:22                                     tagalign     tag is not aligned, should be: json:"accessKeyID"  mapstructure:"accessKeyID"
bindings/alicloud/tablestore/tablestore.go:46:22                                     tagalign     tag is not aligned, should be: json:"accessKey"    mapstructure:"accessKey"
bindings/alicloud/tablestore/tablestore.go:48:22                                     tagalign     tag is not aligned, should be: json:"tableName"    mapstructure:"tableName"
bindings/azure/eventgrid/eventgrid.go:75:28                                          tagalign     tag is not aligned, should be: json:"handshakePort"      mapstructure:"handshakePort"
bindings/azure/eventgrid/eventgrid.go:76:28                                          tagalign     tag is not aligned, should be: json:"scope"              mapstructure:"scope"
bindings/azure/eventgrid/eventgrid.go:82:23                                          tagalign     tag is not aligned, should be: json:"accessKey"     mapstructure:"accessKey"
bindings/aws/s3/s3.go:72:22                                                          tagalign     tag is not aligned, should be: json:"accessKey"    mapstructure:"accessKey"    mdignore:"true"
bindings/aws/s3/s3.go:73:22                                                          tagalign     tag is not aligned, should be: json:"secretKey"    mapstructure:"secretKey"    mdignore:"true"
bindings/aws/s3/s3.go:76:24                                                          tagalign     tag is not aligned, should be: json:"region"                mapstructure:"region"
bindings/aws/s3/s3.go:77:24                                                          tagalign     tag is not aligned, should be: json:"endpoint"              mapstructure:"endpoint"
bindings/aws/s3/s3.go:78:24                                                          tagalign     tag is not aligned, should be: json:"bucket"                mapstructure:"bucket"
bindings/aws/s3/s3.go:79:24                                                          tagalign     tag is not aligned, should be: json:"decodeBase64,string"   mapstructure:"decodeBase64"
bindings/aws/s3/s3.go:80:24                                                          tagalign     tag is not aligned, should be: json:"encodeBase64,string"   mapstructure:"encodeBase64"
bindings/aws/s3/s3.go:82:24                                                          tagalign     tag is not aligned, should be: json:"disableSSL,string"     mapstructure:"disableSSL"
bindings/aws/s3/s3.go:83:24                                                          tagalign     tag is not aligned, should be: json:"insecureSSL,string"    mapstructure:"insecureSSL"
bindings/aws/s3/s3.go:84:24                                                          tagalign     tag is not aligned, should be: json:"filePath"              mapstructure:"filePath"       mdignore:"true"
bindings/aws/s3/s3.go:85:24                                                          tagalign     tag is not aligned, should be: json:"presignTTL"            mapstructure:"presignTTL"     mdignore:"true"
state/aws/dynamodb/dynamodb.go:51:22                                                 tagalign     tag is not aligned, should be: json:"accessKey"    mapstructure:"accessKey"    mdignore:"true"
state/aws/dynamodb/dynamodb.go:52:22                                                 tagalign     tag is not aligned, should be: json:"secretKey"    mapstructure:"secretKey"    mdignore:"true"
state/aws/dynamodb/dynamodb.go:53:22                                                 tagalign     tag is not aligned, should be: json:"sessionToken" mapstructure:"sessionToken" mdignore:"true"
bindings/input_binding.go:21:2                                                       depguard     import 'github.com/dapr/components-contrib/health' is not allowed from list 'Main'
bindings/input_binding.go:22:2                                                       depguard     import 'github.com/dapr/components-contrib/metadata' is not allowed from list 'Main'
bindings/metadata.go:16:8                                                            depguard     import 'github.com/dapr/components-contrib/metadata' is not allowed from list 'Main'
bindings/output_binding.go:20:2                                                      depguard     import 'github.com/dapr/components-contrib/health' is not allowed from list 'Main'
bindings/output_binding.go:21:2                                                      depguard     import 'github.com/dapr/components-contrib/metadata' is not allowed from list 'Main'
bindings/responses.go:17:2                                                           depguard     import 'github.com/dapr/components-contrib/state' is not allowed from list 'Main'
common/authentication/aws/aws.go:17:2                                                depguard     import 'github.com/aws/aws-sdk-go/aws' is not allowed from list 'Main'
common/authentication/aws/aws.go:18:2                                                depguard     import 'github.com/aws/aws-sdk-go/aws/credentials' is not allowed from list 'Main'
common/authentication/aws/aws.go:19:2                                                depguard     import 'github.com/aws/aws-sdk-go/aws/request' is not allowed from list 'Main'
common/authentication/aws/aws.go:20:2                                                depguard     import 'github.com/aws/aws-sdk-go/aws/session' is not allowed from list 'Main'
common/authentication/aws/aws.go:22:2                                                depguard     import 'github.com/dapr/kit/logger' is not allowed from list 'Main'
contenttype/utils.go:19:2                                                            depguard     import 'github.com/cloudevents/sdk-go/binding/format/protobuf/v2' is not allowed from list 'Main'
contenttype/utils.go:20:2                                                            depguard     import 'github.com/cloudevents/sdk-go/v2/event' is not allowed from list 'Main'
bindings/azure/eventhubs/eventhubs.go:20:2                                           depguard     import 'github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs' is not allowed from list 'Main'
bindings/azure/eventhubs/eventhubs.go:22:2                                           depguard     import 'github.com/dapr/components-contrib/bindings' is not allowed from list 'Main'
bindings/azure/eventhubs/eventhubs.go:23:2                                           depguard     import 'github.com/dapr/components-contrib/common/component/azure/eventhubs' is not allowed from list 'Main'
bindings/azure/eventhubs/eventhubs.go:25:2                                           depguard     import 'github.com/dapr/kit/logger' is not allowed from list 'Main'
bindings/azure/eventhubs/eventhubs.go:26:2                                           depguard     import 'github.com/dapr/kit/ptr' is not allowed from list 'Main'
bindings/azure/openai/openai.go:23:2                                                 depguard     import 'github.com/Azure/azure-sdk-for-go/sdk/ai/azopenai' is not allowed from list 'Main'
bindings/azure/openai/openai.go:24:2                                                 depguard     import 'github.com/Azure/azure-sdk-for-go/sdk/azcore/to' is not allowed from list 'Main'
bindings/azure/openai/openai.go:26:2                                                 depguard     import 'github.com/dapr/components-contrib/bindings' is not allowed from list 'Main'
bindings/azure/openai/openai.go:27:2                                                 depguard     import 'github.com/dapr/components-contrib/common/authentication/azure' is not allowed from list 'Main'
bindings/azure/openai/openai.go:29:2                                                 depguard     import 'github.com/dapr/kit/logger' is not allowed from list 'Main'
bindings/azure/openai/openai.go:30:2                                                 depguard     import 'github.com/dapr/kit/metadata' is not allowed from list 'Main'
bindings/azure/servicebusqueues/servicebusqueues.go:26:2                             depguard     import 'github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus' is not allowed from list 'Main'
bindings/azure/servicebusqueues/servicebusqueues.go:28:2                             depguard     import 'github.com/dapr/components-contrib/bindings' is not allowed from list 'Main'
bindings/azure/servicebusqueues/servicebusqueues.go:29:2                             depguard     import 'github.com/dapr/components-contrib/common/component/azure/servicebus' is not allowed from list 'Main'
common/component/cloudflare/workers/metadata.go:27:2                                 depguard     import 'github.com/lestrrat-go/jwx/v2/jwa' is not allowed from list 'Main'
common/component/cloudflare/workers/metadata.go:28:2                                 depguard     import 'github.com/lestrrat-go/jwx/v2/jwt' is not allowed from list 'Main'
common/component/cloudflare/workers/workers.go:32:2                                  depguard     import 'github.com/dapr/components-contrib/common/component/cloudflare/workers/code' is not allowed from list 'Main'
common/component/cloudflare/workers/workers.go:34:2                                  depguard     import 'github.com/dapr/kit/ptr' is not allowed from list 'Main'
bindings/cloudflare/queues/cfqueues.go:28:2                                          depguard     import 'github.com/dapr/components-contrib/common/component/cloudflare/workers' is not allowed from list 'Main'
bindings/cloudflare/queues/cfqueues.go:31:2                                          depguard     import 'github.com/dapr/kit/metadata' is not allowed from list 'Main'
bindings/cloudflare/queues/metadata.go:20:2                                          depguard     import 'github.com/dapr/components-contrib/common/component/cloudflare/workers' is not allowed from list 'Main'
bindings/kafka/kafka.go:27:2                                                         depguard     import 'github.com/dapr/components-contrib/common/component/kafka' is not allowed from list 'Main'
common/authentication/postgresql/metadata.go:22:2                                    depguard     import 'github.com/Azure/azure-sdk-for-go/sdk/azcore/policy' is not allowed from list 'Main'
common/authentication/postgresql/metadata.go:23:2                                    depguard     import 'github.com/jackc/pgx/v5' is not allowed from list 'Main'
common/authentication/postgresql/metadata.go:24:2                                    depguard     import 'github.com/jackc/pgx/v5/pgxpool' is not allowed from list 'Main'
common/authentication/postgresql/metadata.go:26:2                                    depguard     import 'github.com/dapr/components-contrib/common/authentication/azure' is not allowed from list 'Main'
common/component/postgresql/interfaces/interfaces.go:19:2                            depguard     import 'github.com/jackc/pgx/v5' is not allowed from list 'Main'
common/component/postgresql/interfaces/interfaces.go:20:2                            depguard     import 'github.com/jackc/pgx/v5/pgconn' is not allowed from list 'Main'
common/component/sql/adapter.go:21:2                                                 depguard     import 'github.com/jackc/pgx/v5' is not allowed from list 'Main'
common/component/sql/adapter.go:22:2                                                 depguard     import 'github.com/jackc/pgx/v5/pgconn' is not allowed from list 'Main'
common/component/sql/migrations/postgres/postgres_migrations.go:25:2                 depguard     import 'github.com/dapr/components-contrib/common/component/postgresql/interfaces' is not allowed from list 'Main'
common/component/sql/migrations/postgres/postgres_migrations.go:26:2                 depguard     import 'github.com/dapr/components-contrib/common/component/sql' is not allowed from list 'Main'
common/component/sql/migrations/sqlite/sqlite_migrations.go:22:2                     depguard     import 'github.com/dapr/components-contrib/common/component/sql' is not allowed from list 'Main'
crypto/azure/keyvault/algorithms.go:19:2                                             depguard     import 'github.com/Azure/azure-sdk-for-go/sdk/azcore/to' is not allowed from list 'Main'
crypto/azure/keyvault/algorithms.go:20:2                                             depguard     import 'github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys' is not allowed from list 'Main'
crypto/azure/keyvault/algorithms.go:22:2                                             depguard     import 'github.com/dapr/kit/crypto' is not allowed from list 'Main'
crypto/azure/keyvault/component.go:23:2                                              depguard     import 'github.com/Azure/azure-sdk-for-go/sdk/azcore' is not allowed from list 'Main'
common/component/postgresql/interfaces/interfaces.go:26:7                            inamedparam  interface method Exec must have named param for type context.Context
common/component/postgresql/interfaces/interfaces.go:27:8                            inamedparam  interface method Query must have named param for type context.Context
common/component/postgresql/interfaces/interfaces.go:28:11                           inamedparam  interface method QueryRow must have named param for type context.Context
common/component/postgresql/interfaces/interfaces.go:36:8                            inamedparam  interface method Begin must have named param for type context.Context
common/component/postgresql/interfaces/interfaces.go:38:7                            inamedparam  interface method Ping must have named param for type context.Context
common/component/sql/adapter.go:42:10                                                inamedparam  interface method BeginTx must have named param for type context.Context
common/component/sql/adapter.go:43:15                                                inamedparam  interface method QueryContext must have named param for type context.Context
common/component/sql/adapter.go:44:18                                                inamedparam  interface method QueryRowContext must have named param for type context.Context
common/component/sql/adapter.go:45:14                                                inamedparam  interface method ExecContext must have named param for type context.Context
common/component/sql/adapter.go:50:8                                                 inamedparam  interface method Begin must have named param for type context.Context
common/component/sql/adapter.go:51:8                                                 inamedparam  interface method Query must have named param for type context.Context
common/component/sql/adapter.go:52:11                                                inamedparam  interface method QueryRow must have named param for type context.Context
common/component/sql/adapter.go:53:7                                                 inamedparam  interface method Exec must have named param for type context.Context
common/component/sql/adapter.go:58:8                                                 inamedparam  interface method Begin must have named param for type context.Context
common/component/sql/adapter.go:59:11                                                inamedparam  interface method QueryRow must have named param for type context.Context
common/component/sql/adapter.go:60:7                                                 inamedparam  interface method Exec must have named param for type context.Context
common/component/sql/adapter.go:65:7                                                 inamedparam  interface method Scan must have all named params
common/component/sql/adapter.go:69:9                                                 inamedparam  interface method Commit must have named param for type context.Context
common/component/sql/adapter.go:70:11                                                inamedparam  interface method Rollback must have named param for type context.Context
state/query/filter.go:21:8                                                           inamedparam  interface method Parse must have all named params
state/query/query.go:55:10                                                           inamedparam  interface method VisitEQ must have all named params
state/query/query.go:57:10                                                           inamedparam  interface method VisitIN must have all named params
state/query/query.go:59:11                                                           inamedparam  interface method VisitAND must have all named params
state/query/query.go:61:10                                                           inamedparam  interface method VisitOR must have all named params
state/query/query.go:63:11                                                           inamedparam  interface method Finalize must have named param for type string
state/sqlserver/migration.go:23:20                                                   inamedparam  interface method executeMigrations must have named param for type context.Context
bindings/http/http_test.go:293:9                                                     perfsprint   fmt.Sprintf can be replaced with faster strconv.Itoa
configuration/redis/internal/redis_value.go:38:36                                    perfsprint   fmt.Sprint can be replaced with faster strconv.Itoa
configuration/redis/internal/redis_value.go:48:33                                    perfsprint   fmt.Sprint can be replaced with faster strconv.Itoa
pubsub/envelope_test.go:223:20                                                       perfsprint   fmt.Sprintf can be replaced with faster strconv.Itoa
pubsub/kubemq/kubemq.go:76:10                                                        perfsprint   fmt.Sprintf can be replaced with faster strconv.FormatInt
pubsub/redis/redis_test.go:119:8                                                     perfsprint   fmt.Sprintf can be replaced with faster strconv.Itoa
state/couchbase/couchbase_test.go:55:57                                              perfsprint   fmt.Sprintf can be replaced with faster strconv.FormatUint
state/rethinkdb/rethinkdb_test.go:55:24                                              perfsprint   fmt.Sprintf can be replaced with faster strconv.FormatBool
tests/conformance/bindings/bindings.go:132:4                                         testifylint  require-error: for error assertions use require
tests/conformance/bindings/bindings.go:140:4                                         testifylint  require-error: for error assertions use require
tests/conformance/bindings/bindings.go:152:5                                         testifylint  require-error: for error assertions use require
tests/conformance/crypto/crypto.go:96:3                                              testifylint  empty: use require.NotEmptyf
tests/conformance/crypto/crypto.go:100:4                                             testifylint  empty: use require.NotEmptyf
tests/conformance/crypto/crypto.go:222:4                                             testifylint  compares: use require.NotEqual
tests/conformance/crypto/crypto.go:281:6                                             testifylint  compares: use require.NotEqual
tests/conformance/pubsub/pubsub.go:122:4                                             testifylint  error-nil: use assert.NoError
tests/conformance/secretstores/secretstores.go:66:4                                  testifylint  error-nil: use assert.NoError
bindings/alicloud/dingtalk/webhook/webhook_test.go:48:3                              testifylint  error-nil: use require.NoError
bindings/alicloud/dingtalk/webhook/webhook_test.go:104:3                             testifylint  compares: use require.Greater
bindings/alicloud/oss/oss_test.go:29:2                                               testifylint  error-nil: use assert.NoError
bindings/alicloud/tablestore/tablestore_test.go:149:2                                testifylint  expected-actual: need to reverse actual and expected values
bindings/apns/apns_test.go:171:2                                                     testifylint  len: use assert.Len
bindings/aws/s3/s3_test.go:50:3                                                      testifylint  bool-compare: use assert.True
bindings/aws/s3/s3_test.go:51:3                                                      testifylint  bool-compare: use assert.True
bindings/aws/s3/s3_test.go:52:3                                                      testifylint  bool-compare: use assert.True
bindings/aws/s3/s3_test.go:98:3                                                      testifylint  bool-compare: use assert.False
bindings/azure/cosmosdb/cosmosdb_test.go:54:2                                        testifylint  error-nil: use assert.Error
bindings/azure/cosmosdb/cosmosdb_test.go:58:2                                        testifylint  error-nil: use assert.Error
bindings/azure/cosmosdb/cosmosdb_test.go:72:2                                        testifylint  error-nil: use assert.Error
bindings/azure/storagequeues/storagequeues_test.go:198:3                             testifylint  expected-actual: need to reverse actual and expected values
bindings/azure/storagequeues/storagequeues_test.go:240:3                             testifylint  expected-actual: need to reverse actual and expected values
bindings/gcp/bucket/bucket_test.go:118:3                                             testifylint  bool-compare: use assert.False
bindings/gcp/bucket/bucket_test.go:174:3                                             testifylint  bool-compare: use assert.False
bindings/graphql/graphql_test.go:38:3                                                testifylint  len: use assert.Len
bindings/http/http_test.go:387:3                                                     testifylint  compares: use assert.Greater
bindings/http/http_test.go:401:3                                                     testifylint  compares: use assert.Greater
bindings/http/http_test.go:443:3                                                     testifylint  compares: use assert.Equal
bindings/http/http_test.go:460:3                                                     testifylint  compares: use assert.Equal
bindings/huawei/obs/obs_test.go:149:3                                                testifylint  len: use assert.Len
bindings/zeebe/helper_test.go:25:2                                                   testifylint  len: use require.Len
bindings/zeebe/command/activate_jobs_test.go:107:3                                   testifylint  error-is-as: invalid usage of assert.Error, use assert.ErrorIs instead
bindings/zeebe/command/activate_jobs_test.go:120:3                                   testifylint  error-is-as: invalid usage of assert.Error, use assert.ErrorIs instead
bindings/zeebe/command/cancel_instance_test.go:70:3                                  testifylint  error-is-as: invalid usage of assert.Error, use assert.ErrorIs instead
bindings/zeebe/command/command_test.go:96:2                                          testifylint  len: use require.Len
common/component/azure/servicebus/message_test.go:114:5                              testifylint  error-nil: use require.Error
common/component/azure/servicebus/message_test.go:116:5                              testifylint  error-nil: use require.NoError
common/component/kafka/auth_test.go:100:3                                            testifylint  len: use require.Len
common/component/kafka/metadata_test.go:122:2                                        testifylint  bool-compare: use require.True
common/component/kafka/metadata_test.go:300:3                                        testifylint  bool-compare: use require.False
common/component/redis/redis_test.go:132:3                                           testifylint  compares: use assert.Equal
configuration/azure/appconfig/appconfig_test.go:133:3                                testifylint  compares: use assert.Greater
middleware/http/ratelimit/ratelimit_middleware_test.go:62:3                          testifylint  float-compare: use assert.InEpsilon (or InDelta)
middleware/http/ratelimit/ratelimit_middleware_test.go:71:3                          testifylint  float-compare: use assert.InEpsilon (or InDelta)
nameresolution/mdns/mdns_test.go:312:2                                               testifylint  empty: use require.Empty
pubsub/tls_test.go:35:3                                                              testifylint  empty: use assert.Empty
pubsub/aws/snssqs/snssqs_test.go:112:2                                               testifylint  bool-compare: use r.False
pubsub/aws/snssqs/snssqs_test.go:113:2                                               testifylint  float-compare: use r.InEpsilon (or InDelta)
pubsub/aws/snssqs/snssqs_test.go:114:2                                               testifylint  bool-compare: use r.False

@ItalyPaleAle
Copy link
Contributor

I did update the linter in dapr/kit recently and saw some of these things.

  1. I would recommend disabing tagalign and inamedparam
  2. The G202 (SQL string concatenation) are all required, and the data is never user-supplied so they can be silenced
  3. Depguard needs the configuration written differently. You can copy this: https://github.com/dapr/kit/blob/main/.golangci.yml#L120-L167

@ItalyPaleAle ItalyPaleAle linked an issue Nov 28, 2023 that may be closed by this pull request
Signed-off-by: Bernd Verst <github@bernd.dev>
Signed-off-by: Bernd Verst <github@bernd.dev>
Signed-off-by: Bernd Verst <github@bernd.dev>
Signed-off-by: Bernd Verst <github@bernd.dev>
Signed-off-by: Bernd Verst <github@bernd.dev>
@ItalyPaleAle ItalyPaleAle merged commit 9095b0e into main Nov 29, 2023
131 of 132 checks passed
@ItalyPaleAle ItalyPaleAle deleted the go1.21 branch November 29, 2023 02:13
This was referenced Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Go to 1.21
2 participants