diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-11-12 12:13:34 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-11-12 17:39:42 +0300 |
commit | 400c7225dd2a0dd17e907ce5af25e7ade5ed81fb (patch) | |
tree | 18a980ff722a6cde0130a239129218d76f13cf22 /.golangci.yml | |
parent | e55a44689f4a787726df6e230477e77a2b2d9e42 (diff) |
lint: Inline exceptions about missing documentation
Most of the linting exception we have are about missing documentation of
public variables or comments. Let's inline all of these -- it's hard to
keep track of exceptions and keep the list up-to-date. By having a
`//nolint` directive at the site where the document is missing it
becomes a breeze to directly clean it up. Furthermore, it also acts as a
reminder that one might want to add a comment when one stumbles over any
of these comments.
Diffstat (limited to '.golangci.yml')
-rw-r--r-- | .golangci.yml | 533 |
1 files changed, 0 insertions, 533 deletions
diff --git a/.golangci.yml b/.golangci.yml index 6aa4ee2e1..95bf8ed03 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -37,544 +37,14 @@ linters: issues: exclude-use-default: false - # Excluding configuration per-path, per-linter, per-text and per-source exclude-rules: - ## BEGIN revive exclusions - ## - linters: - revive text: "context.Context should be the first parameter of a function" path: "_test.go" - ## revive: Specific issues in non-*_test.go files - - linters: - - revive - path: "client/pool_options.go" - text: "exported type PoolOption should have comment or be unexported" - - linters: - - revive - path: "cmd/gitaly-git2go/conflicts/conflicts.go" - text: "exported method Subcommand.Flags should have comment or be unexported" - - linters: - - revive - path: "cmd/gitaly-git2go/testhelper/testhelper.go" - text: "exported function BuildCommit should have comment or be unexported" - - linters: - - revive - path: "internal/cgroups/noop.go" - text: "exported method NoopManager.Setup should have comment or be unexported" - - linters: - - revive - path: "internal/cgroups/noop.go" - text: "exported method NoopManager.AddCommand should have comment or be unexported" - - linters: - - revive - path: "internal/cgroups/noop.go" - text: "exported method NoopManager.Cleanup should have comment or be unexported" - - linters: - - revive - path: "internal/cgroups/v1_linux.go" - text: "exported method CGroupV1Manager.Setup should have comment or be unexported" - - linters: - - revive - path: "internal/cgroups/v1_linux.go" - text: "exported method CGroupV1Manager.AddCommand should have comment or be unexported" - - linters: - - revive - path: "internal/cgroups/v1_linux.go" - text: "exported method CGroupV1Manager.Cleanup should have comment or be unexported" - - linters: - - revive - path: "internal/command/stats.go" - text: "exported type Stats should have comment or be unexported" - - linters: - - revive - path: "internal/command/stats.go" - text: "exported method Stats.RecordSum should have comment or be unexported" - - linters: - - revive - path: "internal/command/stats.go" - text: "exported method Stats.RecordMax should have comment or be unexported" - - linters: - - revive - path: "internal/command/stats.go" - text: "exported method Stats.Fields should have comment or be unexported" - - linters: - - revive - path: "internal/command/stats.go" - text: "exported function StatsFromContext should have comment or be unexported" - - linters: - - revive - path: "internal/command/stats.go" - text: "exported function InitContextStats should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/config/config.go" - text: "exported function SkipHooks should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/config/config.go" - text: "exported type HTTPSettings should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/config/ruby.go" - text: "exported method Duration.Duration should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/config/ruby.go" - text: "exported method Duration.UnmarshalText should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/config/ruby.go" - text: "exported method Duration.MarshalText should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/hook/check.go" - text: "exported method GitLabHookManager.Check should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/hook/manager.go" - text: "exported method GitLabHookManager.Describe should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/hook/manager.go" - text: "exported method GitLabHookManager.Collect should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/hook/postreceive.go" - text: "exported method GitLabHookManager.PostReceiveHook should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/hook/referencetransaction.go" - text: "exported method GitLabHookManager.ReferenceTransactionHook should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/hook/update.go" - text: "exported method GitLabHookManager.UpdateHook should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/service/internalgitaly/server.go" - text: "exported function NewServer should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/service/operations/apply_patch.go" - text: "exported method Server.UserApplyPatch should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/service/operations/branches.go" - text: "exported method Server.UserDeleteBranch should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/service/operations/branches.go" - text: "exported method Server.UserCreateBranch should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/service/operations/branches.go" - text: "exported method Server.UserUpdateBranch should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/service/operations/cherry_pick.go" - text: "exported method Server.UserCherryPick should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/service/operations/merge.go" - text: "exported method Server.UserFFBranch should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/service/operations/merge.go" - text: "exported method Server.UserMergeBranch should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/service/operations/merge.go" - text: "exported method Server.UserMergeToRef should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/service/operations/rebase.go" - text: "exported method Server.UserRebaseConfirmable should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/service/operations/revert.go" - text: "exported method Server.UserRevert should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/service/operations/server.go" - text: "exported type Server should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/service/operations/squash.go" - text: "exported method Server.UserSquash should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/service/operations/submodules.go" - text: "exported method Server.UserUpdateSubmodule should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/service/operations/tags.go" - text: "exported method Server.UserDeleteTag should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/service/operations/tags.go" - text: "exported method Server.UserCreateTag should have comment or be unexported" - - linters: - - 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: - - 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: - - revive - path: "internal/gitaly/service/smarthttp/server.go" - text: "exported function WithPackfileNegotiationMetrics should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/service/ssh/server.go" - text: "exported function WithPackfileNegotiationMetrics should have comment or be unexported" - - linters: - - revive - path: "internal/git/stats/packfile_negotiation.go" - text: "exported type PackfileNegotiation should have comment or be unexported" - - linters: - - revive - path: "internal/git/stats/packfile_negotiation.go" - text: "exported function ParsePackfileNegotiation should have comment or be unexported" - - linters: - - revive - path: "internal/helper/ticker.go" - text: "exported method ManualTicker.C should have comment or be unexported" - - linters: - - revive - path: "internal/helper/ticker.go" - text: "exported method ManualTicker.Stop should have comment or be unexported" - - linters: - - revive - path: "internal/helper/ticker.go" - text: "exported method ManualTicker.Reset should have comment or be unexported" - - linters: - - revive - path: "internal/helper/ticker.go" - text: "exported method ManualTicker.Tick should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/config/config.go" - text: "exported type Failover should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/config/node.go" - text: "exported method Node.MarshalJSON should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/coordinator.go" - text: "exported method Coordinator.Describe should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/coordinator.go" - text: "exported method Coordinator.Collect should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/assignment.go" - text: "exported method AssignmentStore.GetHostAssignments should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/collector.go" - text: "exported method RepositoryStoreCollector.Describe should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/collector.go" - text: "exported method RepositoryStoreCollector.Collect should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/listener_postgres.go" - text: "exported method PostgresListener.Close should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/listener_postgres.go" - text: "exported method PostgresListener.Describe should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/listener_postgres.go" - text: "exported method PostgresListener.Collect should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/mock.go" - text: "exported method MockReplicationEventQueue.Enqueue should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/queue.go" - text: "exported method PostgresReplicationEventQueue.Enqueue should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/queue.go" - text: "exported method PostgresReplicationEventQueue.Dequeue should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/queue.go" - text: "exported method PostgresReplicationEventQueue.Acknowledge should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/queue.go" - text: "exported method ReplicationJob.Scan should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/queue.go" - text: "exported method ReplicationJob.Value should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/repository_store.go" - text: "exported method PostgresRepositoryStore.GetGeneration should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/repository_store.go" - text: "exported method PostgresRepositoryStore.IncrementGeneration should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/repository_store.go" - text: "exported method PostgresRepositoryStore.SetGeneration should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/repository_store.go" - text: "exported method PostgresRepositoryStore.GetReplicatedGeneration should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/repository_store.go" - text: "exported method PostgresRepositoryStore.DeleteRepository should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/repository_store.go" - text: "exported method PostgresRepositoryStore.RenameRepository should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/repository_store.go" - text: "exported method PostgresRepositoryStore.RepositoryExists should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/repository_store.go" - text: "exported method PostgresRepositoryStore.DeleteInvalidRepository should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/repository_store.go" - text: "exported method PostgresRepositoryStore.GetPartiallyReplicatedRepositories should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/repository_store_mock.go" - text: "exported method MockRepositoryStore.RepositoryExists should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/repository_store_mock.go" - text: "exported method MockRepositoryStore.GetGeneration should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/repository_store_mock.go" - text: "exported method MockRepositoryStore.IncrementGeneration should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/repository_store_mock.go" - text: "exported method MockRepositoryStore.GetReplicatedGeneration should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/repository_store_mock.go" - text: "exported method MockRepositoryStore.SetGeneration should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/repository_store_mock.go" - text: "exported method MockRepositoryStore.DeleteRepository should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/repository_store_mock.go" - text: "exported method MockRepositoryStore.RenameRepository should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/repository_store_mock.go" - text: "exported method MockRepositoryStore.GetPartiallyReplicatedRepositories should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/repository_store_mock.go" - text: "exported method MockRepositoryStore.DeleteInvalidRepository should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/storage_provider.go" - text: "exported method CachingStorageProvider.Notification should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/storage_provider.go" - text: "exported method CachingStorageProvider.Connected should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/storage_provider.go" - text: "exported method CachingStorageProvider.Disconnect should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/storage_provider.go" - text: "exported method CachingStorageProvider.Describe should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/datastore/storage_provider.go" - text: "exported method CachingStorageProvider.Collect should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/grpc-proxy/proxy/director.go" - text: "exported method StreamParameters.Primary should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/grpc-proxy/proxy/director.go" - text: "exported method StreamParameters.Secondaries should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/health_checker.go" - text: "exported method StaticHealthChecker.HealthyNodes should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/metrics/prometheus.go" - text: "exported var MethodTypeCounter should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/metrics/prometheus.go" - text: "exported var PrimaryGauge should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/metrics/prometheus.go" - text: "exported var NodeLastHealthcheckGauge should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/metrics/prometheus.go" - text: "exported var ChecksumMismatchCounter should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/nodes/manager.go" - text: "exported method Mgr.GetSyncedNode should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/nodes/manager.go" - text: "exported method Mgr.HealthyNodes should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/nodes/manager.go" - text: "exported method Mgr.Nodes should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/nodes/manager.go" - text: "exported method Shard.GetNode should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/nodes/mock.go" - text: "exported method MockManager.GetShard should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/nodes/mock.go" - text: "exported method MockNode.GetStorage should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/nodes/mock.go" - text: "exported method MockNode.IsHealthy should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/nodes/mock.go" - text: "exported method MockNode.GetConnection should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/nodes/mock.go" - text: "exported method MockNode.GetAddress should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/nodes/mock.go" - text: "exported method MockNode.GetToken should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/protoregistry/protoregistry.go" - text: "exported method MethodInfo.FullMethodName should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/reconciler/reconciler.go" - text: "exported method Reconciler.Describe should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/reconciler/reconciler.go" - text: "exported method Reconciler.Collect should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/replicator.go" - text: "exported method ReplMgr.Describe should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/replicator.go" - text: "exported method ReplMgr.Collect should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/router_per_repository.go" - text: "exported method PerRepositoryRouter.RouteRepositoryAccessor should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/router_per_repository.go" - text: "exported method PerRepositoryRouter.RouteRepositoryMutator should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/router_per_repository.go" - text: "exported method StaticStorageAssignments.GetHostAssignments should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/service/info/consistencycheck.go" - text: "exported method Server.ConsistencyCheck should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/service/info/dataloss.go" - text: "exported method Server.DatalossCheck should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/service/info/replication_factor.go" - text: "exported method Server.SetReplicationFactor should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/service/info/server.go" - text: "exported method Server.SetAuthoritativeStorage should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/service/transaction/server.go" - text: "exported type Server should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/service/transaction/server.go" - text: "exported function NewServer should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/transactions/manager.go" - text: "exported method Manager.Describe should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/transactions/manager.go" - text: "exported method Manager.Collect should have comment or be unexported" - - linters: - - revive - path: "internal/praefect/transactions/manager.go" - text: "exported var ErrNotFound should have comment or be unexported" - - linters: - - revive - path: "internal/gitaly/storage/locator.go" - text: "exported var ErrRelativePathEscapesRoot should have comment or be unexported" - - linters: - - revive - path: "internal/testhelper/promtest/counter.go" - text: "exported method MockCounter.Value should have comment or be unexported" - - linters: - - revive - path: "internal/testhelper/promtest/counter.go" - text: "exported method MockCounter.Inc should have comment or be unexported" - - linters: - - revive - path: "internal/testhelper/promtest/counter.go" - text: "exported method MockCounter.Add should have comment or be unexported" - - linters: - - revive - path: "internal/testhelper/promtest/counter.go" - text: "exported type MockCounter should have comment or be unexported" - ## END revive exclusions - ## - ## BEGIN errcheck exclusions - ## - ## errcheck: General (wide) rules in non-*_test.go files - linters: - errcheck text: "Error return value of `[^`]+.(Close|Serve)` is not checked" - ## errcheck: Specific issues in non-*_test.go files - linters: - errcheck path: "cmd/gitaly-wrapper/main.go" @@ -607,9 +77,6 @@ issues: - errcheck path: "internal/command/command.go" text: "Error return value of `syscall.Kill` is not checked" - ## END errcheck exclusions - ## - # govet checks all struct initializations must be keyed by field names - linters: - stylecheck text: "at least one file in a package should have a package comment" |