This brings the common files in line with other prometheus repos. Most of these settings are coppied from prometheus/prometheus. Where it was a small change, I have enabled the new linte
rs and made the fixes. The remaining linters that are commented out deserve to be enabled and the fixes applied as independent changes.
Signed-off-by: Joe Adams <github@joeadams.io>
This config isn't needed because we're the code doesn't fail the linter check. The config is however preventing golangci-lint from being upgraded because this does not pass the schema validation.
Signed-off-by: Joe Adams <github@joeadams.io>
The bulk of this change set was automated by the following script which
is being used to aid in converting the various exporters/projects to use
slog:
https://gist.github.com/tjhop/49f96fb7ebbe55b12deee0b0312d8434
In addition to the parts that were straightforward conversions, this
also:
- refactors much of the logging config to adopt slog
- removed custom `logger.go` setup for go-kit
- adopt promslog/flag and use that to handle parsing log
level/format flags
- for consistent behavior, keep log output flag to allow toggle
stdout/stderr for output
- adopt promslog for logger setup
- enables sloglint in golangci-lint config
- drops go-kit/log exclusions from lint config
- tidies mods to drop go-kit/log and go-logfmt/logfmt deps
Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
* ci: update deprecated golangci-lint config
Fixes:
```
WARN [config_reader] The configuration option `linters.errcheck.exclude` is deprecated, please use `linters.errcheck.exclude-functions`.
```
Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
---------
Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>