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/git2go | |
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/git2go')
-rw-r--r-- | internal/git2go/conflicts.go | 2 | ||||
-rw-r--r-- | internal/git2go/merge.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/git2go/conflicts.go b/internal/git2go/conflicts.go index 67f91808a..9bca079ed 100644 --- a/internal/git2go/conflicts.go +++ b/internal/git2go/conflicts.go @@ -70,7 +70,7 @@ func ConflictsCommandFromSerialized(serialized string) (ConflictsCommand, error) return request, nil } -// Serialize serializes the conflicts result. +// SerializeTo serializes the conflicts result and writes it into the writer. func (m ConflictsResult) SerializeTo(writer io.Writer) error { return serializeTo(writer, m) } diff --git a/internal/git2go/merge.go b/internal/git2go/merge.go index 39b2efe15..7659930a1 100644 --- a/internal/git2go/merge.go +++ b/internal/git2go/merge.go @@ -64,7 +64,7 @@ func (m MergeResult) SerializeTo(w io.Writer) error { return serializeTo(w, m) } -// Merge performs a merge via gitaly-git2go. +// Run performs a merge via gitaly-git2go. func (m MergeCommand) Run(ctx context.Context, cfg config.Cfg) (MergeResult, error) { if err := m.verify(); err != nil { return MergeResult{}, fmt.Errorf("merge: %w: %s", ErrInvalidArgument, err.Error()) |