Commit graph

13 commits

Author SHA1 Message Date
Leonard Lyubich
d03fd02f79 lint: Drop no-op govet config
According to https://golangci-lint.run/usage/linters/#govet,
`check-shadowing` no longer exists. Now it should be
```yaml
govet:
  disable: [shadow]
```
but `shadow` is disabled by default. Thus, whole `govet` section is not
needed anymore.

```
$ golangci-lint --version
golangci-lint has version 1.59.1 built with go1.22.3 from 1a55854a on 2024-06-09T18:08:33Z
```

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
2024-07-11 21:22:10 +04:00
Leonard Lyubich
f37fa6f98c lint: Refresh deprecated config
This fixes
```
$ golangci-lint --version
golangci-lint has version 1.59.1 built with go1.22.3 from 1a55854a on 2024-06-09T18:08:33Z
$ golangci-lint run ./...
WARN [config_reader] The configuration option `output.format` is deprecated, please use `output.formats`
```

The configuration file is updated according to
https://golangci-lint.run/usage/configuration/.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
2024-07-11 21:21:21 +04:00
ZhangTao1596
d36df15878 ci: fix lint issues (fix #2948) 2023-03-29 11:19:23 +08:00
Roman Khimov
1895dfb2c1 golangci: enable some more linters
They have not found anything and maybe we better not have them find anything
in the future. Commented ones can be useful in future, but find too many
problems at the moment.
2022-09-02 18:36:26 +03:00
Roman Khimov
97193cf337 golangci: add predeclared linter
These can be confusing.
2022-09-02 18:36:26 +03:00
Roman Khimov
63f212f4b3 golangci: enable/fix misspell 2022-09-02 18:36:26 +03:00
Roman Khimov
4f3ffe7290 golangci: enable errorlint and fix everything it found 2022-09-02 18:36:23 +03:00
Roman Khimov
c703ac6805 golangci: enable contextcheck linter, fix WSClient
pkg/rpcclient/wsclient.go:93:30  contextcheck  Function `Dial` should pass the context parameter
2022-09-02 18:35:54 +03:00
Roman Khimov
3c009271f8 golangci: enable bodyclose checker and fix related code
It has found an issue in the oracle code, so I think it's worth doing.
2022-09-02 18:35:54 +03:00
Roman Khimov
df9a4fa7ce golangci: drop deprecated linters
WARN [runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
WARN [runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
2022-09-02 18:35:54 +03:00
Evgeniy Stratonikov
e503b068b6 .golangci.yml: replace golint with revive
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-09-14 14:39:23 +03:00
Roman Khimov
9d2712573f *: enable godot linter and fix all its warnings
It's important for NeoGo to have clean documentation. No functional changes.
2021-05-12 23:17:03 +03:00
Roman Khimov
3fdba9265f add golangci-lint configuration
It's mostly based on neofs-http-gate configuration, but has exhaustive
disabled and some golint-specific warnings enabled (some of which are
important for us).
2021-05-12 22:53:28 +03:00