Commit Graph

8 Commits

Author SHA1 Message Date
Joe Adams
4a54705614
Update golangci-lint config for v2 (#1034)
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>
2025-05-06 22:22:12 -04:00
Joe Adams
f0ae1957f4
Remove unused golangci-lint config
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>
2025-03-09 21:09:28 -04:00
TJ Hoplock
7a09a847ab
chore!: adopt log/slog, drop go-kit/log (#942)
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>
2024-10-17 12:03:17 -04:00
Joe Adams
7aab9dab92
Remove unused-parameter lint rule
Signed-off-by: Joe Adams <github@joeadams.io>
2023-08-09 20:16:20 -04:00
SuperQ
0008ee9768
Update build and cleanup
* Update Go to 1.20.
* Update Makefile.common
* Update golangci-lint.
* Update exporter-toolkit.
* Cleanup useless `_` assignment for go-kit/log.
* Cleanup deprecated and unused code.

Signed-off-by: SuperQ <superq@gmail.com>
2023-03-23 09:51:33 +01:00
Ben Kochie
c2365f8e6d
Enable revive linter (#519)
* Bump Go to 1.17
* Bump prometheus orb to 0.15.0
* Enable `revive` linter.
* Fixup linter nits.

Signed-off-by: SuperQ <superq@gmail.com>
2022-01-19 09:39:54 -05:00
Joe Adams
add48f2293
Fix yamllint errors
Signed-off-by: Joe Adams <github@joeadams.io>
2021-06-28 21:42:50 -04:00
SuperQ
3ce6feea30
Update Go modules
* Update Go modules to latest.
* Fix golangci-lint issues.
* Update to use promhttp.Handler()
* Enable lint test.
* Fix up Makefile.common.

Signed-off-by: SuperQ <superq@gmail.com>
2021-05-31 10:01:10 +02:00