diff options
-rw-r--r-- | .golangci.yml | 526 | ||||
-rw-r--r-- | internal/praefect/nodes/sql_elector_test.go | 2 | ||||
-rw-r--r-- | internal/testhelper/db.go | 2 |
3 files changed, 265 insertions, 265 deletions
diff --git a/.golangci.yml b/.golangci.yml index d0f0e9849..28b4fb2cc 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -13,7 +13,6 @@ linters: - exportloopref - gci - goimports - - golint - gosimple - govet - ineffassign @@ -22,6 +21,7 @@ linters: - misspell - noctx - nolintlint + - revive - rowserrcheck - sqlclosecheck - staticcheck @@ -36,534 +36,534 @@ issues: exclude-use-default: false # Excluding configuration per-path, per-linter, per-text and per-source exclude-rules: - ## BEGIN golint exclusions + ## BEGIN revive exclusions ## - linters: - - golint + - revive text: "context.Context should be the first parameter of a function" path: "_test.go" - ## golint: Specific issues in non-*_test.go files + ## revive: Specific issues in non-*_test.go files - linters: - - golint + - revive path: "client/pool_options.go" - text: "exported type `PoolOption` should have comment or be unexported" + text: "exported type PoolOption should have comment or be unexported" - linters: - - golint + - revive path: "cmd/gitaly-git2go/conflicts/conflicts.go" - text: "exported method `Subcommand.Flags` should have comment or be unexported" + text: "exported method Subcommand.Flags should have comment or be unexported" - linters: - - golint + - revive path: "cmd/gitaly-git2go/testhelper/testhelper.go" - text: "exported function `BuildCommit` should have comment or be unexported" + text: "exported function BuildCommit should have comment or be unexported" - linters: - - golint + - revive path: "internal/cgroups/noop.go" - text: "exported method `NoopManager.Setup` should have comment or be unexported" + text: "exported method NoopManager.Setup should have comment or be unexported" - linters: - - golint + - revive path: "internal/cgroups/noop.go" - text: "exported method `NoopManager.AddCommand` should have comment or be unexported" + text: "exported method NoopManager.AddCommand should have comment or be unexported" - linters: - - golint + - revive path: "internal/cgroups/noop.go" - text: "exported method `NoopManager.Cleanup` should have comment or be unexported" + text: "exported method NoopManager.Cleanup should have comment or be unexported" - linters: - - golint + - revive path: "internal/cgroups/v1_linux.go" - text: "exported method `CGroupV1Manager.Setup` should have comment or be unexported" + text: "exported method CGroupV1Manager.Setup should have comment or be unexported" - linters: - - golint + - revive path: "internal/cgroups/v1_linux.go" - text: "exported method `CGroupV1Manager.AddCommand` should have comment or be unexported" + text: "exported method CGroupV1Manager.AddCommand should have comment or be unexported" - linters: - - golint + - revive path: "internal/cgroups/v1_linux.go" - text: "exported method `CGroupV1Manager.Cleanup` should have comment or be unexported" + text: "exported method CGroupV1Manager.Cleanup should have comment or be unexported" - linters: - - golint + - revive path: "internal/command/stats.go" - text: "exported type `Stats` should have comment or be unexported" + text: "exported type Stats should have comment or be unexported" - linters: - - golint + - revive path: "internal/command/stats.go" - text: "exported method `Stats.RecordSum` should have comment or be unexported" + text: "exported method Stats.RecordSum should have comment or be unexported" - linters: - - golint + - revive path: "internal/command/stats.go" - text: "exported method `Stats.RecordMax` should have comment or be unexported" + text: "exported method Stats.RecordMax should have comment or be unexported" - linters: - - golint + - revive path: "internal/command/stats.go" - text: "exported method `Stats.Fields` should have comment or be unexported" + text: "exported method Stats.Fields should have comment or be unexported" - linters: - - golint + - revive path: "internal/command/stats.go" - text: "exported function `StatsFromContext` should have comment or be unexported" + text: "exported function StatsFromContext should have comment or be unexported" - linters: - - golint + - revive path: "internal/command/stats.go" - text: "exported function `InitContextStats` should have comment or be unexported" + text: "exported function InitContextStats should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/config/config.go" - text: "exported function `SkipHooks` should have comment or be unexported" + text: "exported function SkipHooks should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/config/config.go" - text: "exported type `HTTPSettings` should have comment or be unexported" + text: "exported type HTTPSettings should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/config/ruby.go" - text: "exported method `Duration.Duration` should have comment or be unexported" + text: "exported method Duration.Duration should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/config/ruby.go" - text: "exported method `Duration.UnmarshalText` should have comment or be unexported" + text: "exported method Duration.UnmarshalText should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/config/ruby.go" - text: "exported method `Duration.MarshalText` should have comment or be unexported" + text: "exported method Duration.MarshalText should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/hook/check.go" - text: "exported method `GitLabHookManager.Check` should have comment or be unexported" + text: "exported method GitLabHookManager.Check should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/hook/manager.go" - text: "exported method `GitLabHookManager.Describe` should have comment or be unexported" + text: "exported method GitLabHookManager.Describe should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/hook/manager.go" - text: "exported method `GitLabHookManager.Collect` should have comment or be unexported" + text: "exported method GitLabHookManager.Collect should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/hook/postreceive.go" - text: "exported method `GitLabHookManager.PostReceiveHook` should have comment or be unexported" + text: "exported method GitLabHookManager.PostReceiveHook should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/hook/referencetransaction.go" - text: "exported method `GitLabHookManager.ReferenceTransactionHook` should have comment or be unexported" + text: "exported method GitLabHookManager.ReferenceTransactionHook should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/hook/update.go" - text: "exported method `GitLabHookManager.UpdateHook` should have comment or be unexported" + text: "exported method GitLabHookManager.UpdateHook should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/service/internalgitaly/server.go" - text: "exported function `NewServer` should have comment or be unexported" + text: "exported function NewServer should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/service/operations/apply_patch.go" - text: "exported method `Server.UserApplyPatch` should have comment or be unexported" + text: "exported method Server.UserApplyPatch should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/service/operations/branches.go" - text: "exported method `Server.UserDeleteBranch` should have comment or be unexported" + text: "exported method Server.UserDeleteBranch should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/service/operations/branches.go" - text: "exported method `Server.UserCreateBranch` should have comment or be unexported" + text: "exported method Server.UserCreateBranch should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/service/operations/branches.go" - text: "exported method `Server.UserUpdateBranch` should have comment or be unexported" + text: "exported method Server.UserUpdateBranch should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/service/operations/cherry_pick.go" - text: "exported method `Server.UserCherryPick` should have comment or be unexported" + text: "exported method Server.UserCherryPick should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/service/operations/merge.go" - text: "exported method `Server.UserFFBranch` should have comment or be unexported" + text: "exported method Server.UserFFBranch should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/service/operations/merge.go" - text: "exported method `Server.UserMergeBranch` should have comment or be unexported" + text: "exported method Server.UserMergeBranch should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/service/operations/merge.go" - text: "exported method `Server.UserMergeToRef` should have comment or be unexported" + text: "exported method Server.UserMergeToRef should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/service/operations/rebase.go" - text: "exported method `Server.UserRebaseConfirmable` should have comment or be unexported" + text: "exported method Server.UserRebaseConfirmable should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/service/operations/revert.go" - text: "exported method `Server.UserRevert` should have comment or be unexported" + text: "exported method Server.UserRevert should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/service/operations/server.go" - text: "exported type `Server` should have comment or be unexported" + text: "exported type Server should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/service/operations/squash.go" - text: "exported method `Server.UserSquash` should have comment or be unexported" + text: "exported method Server.UserSquash should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/service/operations/submodules.go" - text: "exported method `Server.UserUpdateSubmodule` should have comment or be unexported" + text: "exported method Server.UserUpdateSubmodule should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/service/operations/tags.go" - text: "exported method `Server.UserDeleteTag` should have comment or be unexported" + text: "exported method Server.UserDeleteTag should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/service/operations/tags.go" - text: "exported method `Server.UserCreateTag` should have comment or be unexported" + text: "exported method Server.UserCreateTag should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/service/repository/commit_graph.go" text: "exported const CommitGraphRelPath should have comment \\(or a comment on this block\\) or be unexported" - linters: - - golint + - revive path: "internal/gitaly/service/repository/midx.go" text: "exported const MidxRelPath should have comment \\(or a comment on this block\\) or be unexported" - linters: - - golint + - revive path: "internal/gitaly/service/smarthttp/server.go" - text: "exported function `WithPackfileNegotiationMetrics` should have comment or be unexported" + text: "exported function WithPackfileNegotiationMetrics should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/service/ssh/server.go" - text: "exported function `WithPackfileNegotiationMetrics` should have comment or be unexported" + text: "exported function WithPackfileNegotiationMetrics should have comment or be unexported" - linters: - - golint + - revive path: "internal/git/stats/packfile_negotiation.go" - text: "exported type `PackfileNegotiation` should have comment or be unexported" + text: "exported type PackfileNegotiation should have comment or be unexported" - linters: - - golint + - revive path: "internal/git/stats/packfile_negotiation.go" - text: "exported function `ParsePackfileNegotiation` should have comment or be unexported" + text: "exported function ParsePackfileNegotiation should have comment or be unexported" - linters: - - golint + - revive path: "internal/helper/ticker.go" - text: "exported method `ManualTicker.C` should have comment or be unexported" + text: "exported method ManualTicker.C should have comment or be unexported" - linters: - - golint + - revive path: "internal/helper/ticker.go" - text: "exported method `ManualTicker.Stop` should have comment or be unexported" + text: "exported method ManualTicker.Stop should have comment or be unexported" - linters: - - golint + - revive path: "internal/helper/ticker.go" - text: "exported method `ManualTicker.Reset` should have comment or be unexported" + text: "exported method ManualTicker.Reset should have comment or be unexported" - linters: - - golint + - revive path: "internal/helper/ticker.go" - text: "exported method `ManualTicker.Tick` should have comment or be unexported" + text: "exported method ManualTicker.Tick should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/config/config.go" - text: "exported type `Failover` should have comment or be unexported" + text: "exported type Failover should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/config/node.go" - text: "exported method `Node.MarshalJSON` should have comment or be unexported" + text: "exported method Node.MarshalJSON should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/coordinator.go" - text: "exported method `Coordinator.Describe` should have comment or be unexported" + text: "exported method Coordinator.Describe should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/coordinator.go" - text: "exported method `Coordinator.Collect` should have comment or be unexported" + text: "exported method Coordinator.Collect should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/assignment.go" - text: "exported method `AssignmentStore.GetHostAssignments` should have comment or be unexported" + text: "exported method AssignmentStore.GetHostAssignments should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/collector.go" - text: "exported method `RepositoryStoreCollector.Describe` should have comment or be unexported" + text: "exported method RepositoryStoreCollector.Describe should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/collector.go" - text: "exported method `RepositoryStoreCollector.Collect` should have comment or be unexported" + text: "exported method RepositoryStoreCollector.Collect should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/listener_postgres.go" - text: "exported method `PostgresListener.Close` should have comment or be unexported" + text: "exported method PostgresListener.Close should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/listener_postgres.go" - text: "exported method `PostgresListener.Describe` should have comment or be unexported" + text: "exported method PostgresListener.Describe should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/listener_postgres.go" - text: "exported method `PostgresListener.Collect` should have comment or be unexported" + text: "exported method PostgresListener.Collect should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/mock.go" - text: "exported method `MockReplicationEventQueue.Enqueue` should have comment or be unexported" + text: "exported method MockReplicationEventQueue.Enqueue should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/queue.go" - text: "exported method `PostgresReplicationEventQueue.Enqueue` should have comment or be unexported" + text: "exported method PostgresReplicationEventQueue.Enqueue should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/queue.go" - text: "exported method `PostgresReplicationEventQueue.Dequeue` should have comment or be unexported" + text: "exported method PostgresReplicationEventQueue.Dequeue should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/queue.go" - text: "exported method `PostgresReplicationEventQueue.Acknowledge` should have comment or be unexported" + text: "exported method PostgresReplicationEventQueue.Acknowledge should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/queue.go" - text: "exported method `ReplicationJob.Scan` should have comment or be unexported" + text: "exported method ReplicationJob.Scan should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/queue.go" - text: "exported method `ReplicationJob.Value` should have comment or be unexported" + text: "exported method ReplicationJob.Value should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/repository_store.go" - text: "exported method `PostgresRepositoryStore.GetGeneration` should have comment or be unexported" + text: "exported method PostgresRepositoryStore.GetGeneration should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/repository_store.go" - text: "exported method `PostgresRepositoryStore.IncrementGeneration` should have comment or be unexported" + text: "exported method PostgresRepositoryStore.IncrementGeneration should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/repository_store.go" - text: "exported method `PostgresRepositoryStore.SetGeneration` should have comment or be unexported" + text: "exported method PostgresRepositoryStore.SetGeneration should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/repository_store.go" - text: "exported method `PostgresRepositoryStore.GetReplicatedGeneration` should have comment or be unexported" + text: "exported method PostgresRepositoryStore.GetReplicatedGeneration should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/repository_store.go" - text: "exported method `PostgresRepositoryStore.DeleteRepository` should have comment or be unexported" + text: "exported method PostgresRepositoryStore.DeleteRepository should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/repository_store.go" - text: "exported method `PostgresRepositoryStore.RenameRepository` should have comment or be unexported" + text: "exported method PostgresRepositoryStore.RenameRepository should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/repository_store.go" - text: "exported method `PostgresRepositoryStore.RepositoryExists` should have comment or be unexported" + text: "exported method PostgresRepositoryStore.RepositoryExists should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/repository_store.go" - text: "exported method `PostgresRepositoryStore.DeleteInvalidRepository` should have comment or be unexported" + text: "exported method PostgresRepositoryStore.DeleteInvalidRepository should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/repository_store.go" - text: "exported method `PostgresRepositoryStore.GetPartiallyReplicatedRepositories` should have comment or be unexported" + text: "exported method PostgresRepositoryStore.GetPartiallyReplicatedRepositories should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/repository_store_mock.go" - text: "exported method `MockRepositoryStore.RepositoryExists` should have comment or be unexported" + text: "exported method MockRepositoryStore.RepositoryExists should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/repository_store_mock.go" - text: "exported method `MockRepositoryStore.GetGeneration` should have comment or be unexported" + text: "exported method MockRepositoryStore.GetGeneration should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/repository_store_mock.go" - text: "exported method `MockRepositoryStore.IncrementGeneration` should have comment or be unexported" + text: "exported method MockRepositoryStore.IncrementGeneration should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/repository_store_mock.go" - text: "exported method `MockRepositoryStore.GetReplicatedGeneration` should have comment or be unexported" + text: "exported method MockRepositoryStore.GetReplicatedGeneration should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/repository_store_mock.go" - text: "exported method `MockRepositoryStore.SetGeneration` should have comment or be unexported" + text: "exported method MockRepositoryStore.SetGeneration should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/repository_store_mock.go" - text: "exported method `MockRepositoryStore.DeleteRepository` should have comment or be unexported" + text: "exported method MockRepositoryStore.DeleteRepository should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/repository_store_mock.go" - text: "exported method `MockRepositoryStore.RenameRepository` should have comment or be unexported" + text: "exported method MockRepositoryStore.RenameRepository should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/repository_store_mock.go" - text: "exported method `MockRepositoryStore.GetPartiallyReplicatedRepositories` should have comment or be unexported" + text: "exported method MockRepositoryStore.GetPartiallyReplicatedRepositories should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/repository_store_mock.go" - text: "exported method `MockRepositoryStore.DeleteInvalidRepository` should have comment or be unexported" + text: "exported method MockRepositoryStore.DeleteInvalidRepository should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/storage_provider.go" - text: "exported method `CachingStorageProvider.Notification` should have comment or be unexported" + text: "exported method CachingStorageProvider.Notification should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/storage_provider.go" - text: "exported method `CachingStorageProvider.Connected` should have comment or be unexported" + text: "exported method CachingStorageProvider.Connected should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/storage_provider.go" - text: "exported method `CachingStorageProvider.Disconnect` should have comment or be unexported" + text: "exported method CachingStorageProvider.Disconnect should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/storage_provider.go" - text: "exported method `CachingStorageProvider.Describe` should have comment or be unexported" + text: "exported method CachingStorageProvider.Describe should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/datastore/storage_provider.go" - text: "exported method `CachingStorageProvider.Collect` should have comment or be unexported" + text: "exported method CachingStorageProvider.Collect should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/grpc-proxy/proxy/director.go" - text: "exported method `StreamParameters.Primary` should have comment or be unexported" + text: "exported method StreamParameters.Primary should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/grpc-proxy/proxy/director.go" - text: "exported method `StreamParameters.Secondaries` should have comment or be unexported" + text: "exported method StreamParameters.Secondaries should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/health_checker.go" - text: "exported method `StaticHealthChecker.HealthyNodes` should have comment or be unexported" + text: "exported method StaticHealthChecker.HealthyNodes should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/metrics/prometheus.go" - text: "exported var `MethodTypeCounter` should have comment or be unexported" + text: "exported var MethodTypeCounter should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/metrics/prometheus.go" - text: "exported var `PrimaryGauge` should have comment or be unexported" + text: "exported var PrimaryGauge should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/metrics/prometheus.go" - text: "exported var `NodeLastHealthcheckGauge` should have comment or be unexported" + text: "exported var NodeLastHealthcheckGauge should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/metrics/prometheus.go" - text: "exported var `ChecksumMismatchCounter` should have comment or be unexported" + text: "exported var ChecksumMismatchCounter should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/nodes/manager.go" - text: "exported method `Mgr.GetSyncedNode` should have comment or be unexported" + text: "exported method Mgr.GetSyncedNode should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/nodes/manager.go" - text: "exported method `Mgr.HealthyNodes` should have comment or be unexported" + text: "exported method Mgr.HealthyNodes should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/nodes/manager.go" - text: "exported method `Mgr.Nodes` should have comment or be unexported" + text: "exported method Mgr.Nodes should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/nodes/manager.go" - text: "exported method `Shard.GetNode` should have comment or be unexported" + text: "exported method Shard.GetNode should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/nodes/mock.go" - text: "exported method `MockManager.GetShard` should have comment or be unexported" + text: "exported method MockManager.GetShard should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/nodes/mock.go" - text: "exported method `MockNode.GetStorage` should have comment or be unexported" + text: "exported method MockNode.GetStorage should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/nodes/mock.go" - text: "exported method `MockNode.IsHealthy` should have comment or be unexported" + text: "exported method MockNode.IsHealthy should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/nodes/mock.go" - text: "exported method `MockNode.GetConnection` should have comment or be unexported" + text: "exported method MockNode.GetConnection should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/nodes/mock.go" - text: "exported method `MockNode.GetAddress` should have comment or be unexported" + text: "exported method MockNode.GetAddress should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/nodes/mock.go" - text: "exported method `MockNode.GetToken` should have comment or be unexported" + text: "exported method MockNode.GetToken should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/protoregistry/protoregistry.go" - text: "exported method `MethodInfo.FullMethodName` should have comment or be unexported" + text: "exported method MethodInfo.FullMethodName should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/reconciler/reconciler.go" - text: "exported method `Reconciler.Describe` should have comment or be unexported" + text: "exported method Reconciler.Describe should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/reconciler/reconciler.go" - text: "exported method `Reconciler.Collect` should have comment or be unexported" + text: "exported method Reconciler.Collect should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/replicator.go" - text: "exported method `ReplMgr.Describe` should have comment or be unexported" + text: "exported method ReplMgr.Describe should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/replicator.go" - text: "exported method `ReplMgr.Collect` should have comment or be unexported" + text: "exported method ReplMgr.Collect should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/router_per_repository.go" - text: "exported method `PerRepositoryRouter.RouteRepositoryAccessor` should have comment or be unexported" + text: "exported method PerRepositoryRouter.RouteRepositoryAccessor should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/router_per_repository.go" - text: "exported method `PerRepositoryRouter.RouteRepositoryMutator` should have comment or be unexported" + text: "exported method PerRepositoryRouter.RouteRepositoryMutator should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/router_per_repository.go" - text: "exported method `StaticStorageAssignments.GetHostAssignments` should have comment or be unexported" + text: "exported method StaticStorageAssignments.GetHostAssignments should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/service/info/consistencycheck.go" - text: "exported method `Server.ConsistencyCheck` should have comment or be unexported" + text: "exported method Server.ConsistencyCheck should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/service/info/dataloss.go" - text: "exported method `Server.DatalossCheck` should have comment or be unexported" + text: "exported method Server.DatalossCheck should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/service/info/replication_factor.go" - text: "exported method `Server.SetReplicationFactor` should have comment or be unexported" + text: "exported method Server.SetReplicationFactor should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/service/info/server.go" - text: "exported method `Server.SetAuthoritativeStorage` should have comment or be unexported" + text: "exported method Server.SetAuthoritativeStorage should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/service/transaction/server.go" - text: "exported type `Server` should have comment or be unexported" + text: "exported type Server should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/service/transaction/server.go" - text: "exported function `NewServer` should have comment or be unexported" + text: "exported function NewServer should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/transactions/manager.go" - text: "exported method `Manager.Describe` should have comment or be unexported" + text: "exported method Manager.Describe should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/transactions/manager.go" - text: "exported method `Manager.Collect` should have comment or be unexported" + text: "exported method Manager.Collect should have comment or be unexported" - linters: - - golint + - revive path: "internal/praefect/transactions/manager.go" - text: "exported var `ErrNotFound` should have comment or be unexported" + text: "exported var ErrNotFound should have comment or be unexported" - linters: - - golint + - revive path: "internal/gitaly/storage/locator.go" - text: "exported var `ErrRelativePathEscapesRoot` should have comment or be unexported" + text: "exported var ErrRelativePathEscapesRoot should have comment or be unexported" - linters: - - golint + - revive path: "internal/testhelper/promtest/counter.go" - text: "exported method `MockCounter.Value` should have comment or be unexported" + text: "exported method MockCounter.Value should have comment or be unexported" - linters: - - golint + - revive path: "internal/testhelper/promtest/counter.go" - text: "exported method `MockCounter.Inc` should have comment or be unexported" + text: "exported method MockCounter.Inc should have comment or be unexported" - linters: - - golint + - revive path: "internal/testhelper/promtest/counter.go" - text: "exported method `MockCounter.Add` should have comment or be unexported" + text: "exported method MockCounter.Add should have comment or be unexported" - linters: - - golint + - revive path: "internal/testhelper/promtest/counter.go" - text: "exported type `MockCounter` should have comment or be unexported" - ## END golint exclusions + text: "exported type MockCounter should have comment or be unexported" + ## END revive exclusions ## ## BEGIN errcheck exclusions ## diff --git a/internal/praefect/nodes/sql_elector_test.go b/internal/praefect/nodes/sql_elector_test.go index 09d0a89c2..1235e9bc0 100644 --- a/internal/praefect/nodes/sql_elector_test.go +++ b/internal/praefect/nodes/sql_elector_test.go @@ -25,7 +25,7 @@ import ( "google.golang.org/grpc/status" ) -var shardName string = "test-shard-0" +var shardName = "test-shard-0" func TestGetPrimaryAndSecondaries(t *testing.T) { t.Parallel() diff --git a/internal/testhelper/db.go b/internal/testhelper/db.go index be5cb1c1e..130e39950 100644 --- a/internal/testhelper/db.go +++ b/internal/testhelper/db.go @@ -14,7 +14,7 @@ import ( // passed in nodes are the only ones considered healthy after the function. As the healthy nodes are determined by the time of // the last successful health check, this should be run in the same transastion as the tested query to prevent flakiness. // -//nolint:golint +//nolint:revive func SetHealthyNodes(t testing.TB, ctx context.Context, db glsql.Querier, healthyNodes map[string]map[string][]string) { t.Helper() |