diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-12-17 14:05:37 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-12-17 14:30:46 +0300 |
commit | a8e04c61c8670fe3c16472c9550e4b03968a5114 (patch) | |
tree | c635d26f66af8a2b23ea7beff783ee10e6d13000 /internal/praefect/router_per_repository.go | |
parent | 6f95abefc38e6ed73977178cca104943ee7e44c6 (diff) |
golangci: Do not use default excludes
The golangci-lint project has a set of default excludes for linters
which are applied by default. This means that we cannot choose ourselves
which linting messages we want to include, as some of them cannot be
controlled by us.
One noteworthy linting check which is excluded right now checks whether
comments for types and functions are prefixed with their respective
name. This is something which we try to enforce in Gitaly, too, but
naturally there's cases where it slips through review.
So let's disable the default excludes such that we can enable this
linting check. As it turns out, there's quite a lot of cases where we
failed to adhere to this style, which this commit also fixes. One thing
which we don't do though is to have per-package comments, so let's
actively ignore it for now.
Diffstat (limited to 'internal/praefect/router_per_repository.go')
-rw-r--r-- | internal/praefect/router_per_repository.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/praefect/router_per_repository.go b/internal/praefect/router_per_repository.go index d2174c9bb..9f88318b6 100644 --- a/internal/praefect/router_per_repository.go +++ b/internal/praefect/router_per_repository.go @@ -107,8 +107,10 @@ func (r *PerRepositoryRouter) pickRandom(nodes []RouterNode) (RouterNode, error) return nodes[r.rand.Intn(len(nodes))], nil } -// The only storage scoped accessor RPC is RemoteService/FindRemoteRepository, which in turn executes a command -// without a repository. This can be done by any Gitaly server as it doesn't depend on the state on the server. +// RouteStorageAccessor routes requests for storage-scoped accessor RPCs. The +// only storage scoped accessor RPC is RemoteService/FindRemoteRepository, +// which in turn executes a command without a repository. This can be done by +// any Gitaly server as it doesn't depend on the state on the server. func (r *PerRepositoryRouter) RouteStorageAccessor(ctx context.Context, virtualStorage string) (RouterNode, error) { healthyNodes, err := r.healthyNodes(virtualStorage) if err != nil { |