Closed aine-etke closed 1 year ago
distributive: Arch Linux golangci-lint was downloaded from binary releases
Hello,
you have to do a go mod tidy
.
$ git clone git@gitlab.com:etke.cc/mrs/api.git
Cloning into 'api'...
remote: Enumerating objects: 4850, done.
remote: Counting objects: 100% (732/732), done.
remote: Compressing objects: 100% (634/634), done.
remote: Total 4850 (delta 123), reused 370 (delta 53), pack-reused 4118
Receiving objects: 100% (4850/4850), 128.67 MiB | 18.27 MiB/s, done.
Resolving deltas: 100% (1585/1585), done.
$ golangci-lint run ./...
ERRO Running error: context loading failed: no go files to analyze
$ go mod tidy
go: downloading github.com/matrix-org/gomatrix v0.0.0-20210324163249-be2af5ef2e16
$ golangci-lint run ./...
services/blocklist.go:7: File is not `gci`-ed with --skip-generated -s standard -s default -s prefix(gitlab.com/etke.cc/mrs/api) (gci)
"gitlab.com/etke.cc/mrs/api/utils"
services/blocklist.go:8: File is not `gci`-ed with --skip-generated -s standard -s default -s prefix(gitlab.com/etke.cc/mrs/api) (gci)
"golang.org/x/exp/slices"
services/cache.go:32:6: type `cacheBunny` is unused (unused)
type cacheBunny struct {
^
services/cache.go:105: File is not `gofumpt`-ed (gofumpt)
services/moderation.go:39:116: NewModeration - result 1 (error) is always nil (unparam)
func NewModeration(cfg ConfigService, data DataRepository, index IndexRepository, mail EmailService) (*Moderation, error) {
^
services/moderation.go:87:10: Error return value of `url.Parse` is not checked (errcheck)
apiURL, _ := url.Parse(m.cfg.Get().Public.API)
^
services/stats.go:226:6: func `getSymbol` is unused (unused)
func getSymbol[T Number](diff T) string {
^
services/stats.go:237:6: func `abs` is unused (unused)
func abs[T Number](number T) T {
^
Welcome
Description of the problem
Running
golangci-lint run ./...
inside the root of the https://gitlab.com/etke.cc/mrs/api project fails with the error:Version of golangci-lint
Configuration
Go environment
Verbose output of running
A minimal reproducible example or link to a public repository
Validation