The new configuration file was initially generated by golangci-lint
migrate, when tweaked to minimize and simplify.
golangci-lint v2 switches to a new version of staticcheck which shows
much more warnings. Some of them were fixed by a few previous commits,
and the rest of them are disabled.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit makes use of golangci-lint to check that the source code is
formatted with gofumpt, and removes hack/gofmt.sh which is no longer
needed.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This fixes the following issue with golangci-lint:
> ERRO Running error: no such linter "cyclop"
Instead of enabling all the linters and then disabling many of
them, start with the default set of enabled linters, and disable
some that are currently giving errors.
This should make upgrading golangci-lint easier, as it maintains a
sensitive set of linters enabled by default (and enabling all linters by
default means we will enable some new and unknown linters every time
we bump golangci-lint version).
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
It is an upstream recommendation to not vendor golangci-lint and use the
pre-built binary instead. This means we now remove it from the vendored
sources and update the config as well.
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
it was an attempt to use OSTree to deduplicate files, at the time we
already had a dependency on OSTree for system containers in
containers/image. Since the feature never really took off, let's just
drop it.
Closes: https://github.com/containers/storage/issues/419
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit uses internal tools vendoring to switch to golangci-lint. All
working linters have been enabled. The other tools have been vendored as
well into the same tools folder, whereas the corresponding test and
build targets have been adapted as well.
Signed-off-by: Sascha Grunert <sgrunert@suse.com>