Commit Graph

10 Commits

Author SHA1 Message Date
Owen Williams 6d039205b8 deps: bump prometheus/common version
Fixes https://github.com/prometheus/client_golang/issues/1446

Signed-off-by: Owen Williams <owen.williams@grafana.com>
2024-02-23 13:28:17 -05:00
João Vilaça 60a85133ed
Add support for custom validations in promlint (#1311)
* Refactor promlint validation structure

Signed-off-by: João Vilaça <jvilaca@redhat.com>

* Add support for custom validations in promlint

Signed-off-by: João Vilaça <jvilaca@redhat.com>

* Keep backwards compatibility

Signed-off-by: João Vilaça <jvilaca@redhat.com>

---------

Signed-off-by: João Vilaça <jvilaca@redhat.com>
2023-10-10 10:38:10 +01:00
Aviv Litman e4ff34d23e
Improve metricUnits runtime (#1286)
We tested this function runtime in both cases using "testing",
and the runtime for this pr is much shorter.

Signed-off-by: alitman <alitman@redhat.com>
2023-06-08 11:35:32 +01:00
Christoph Mewes 618194de6a
fix assorted oddities found by golangci-lint (#1040)
* fix assorted oddities found by golangci-lint

Signed-off-by: Christoph Mewes <christoph@kubermatic.com>

* permanently enable the linters

Signed-off-by: Christoph Mewes <christoph@kubermatic.com>

* post-rebase blues

Signed-off-by: Christoph Mewes <christoph@kubermatic.com>
2022-08-03 06:30:51 +02:00
Soroosh Azary Marhabi 2cfd1eb960
Enable same linters as the Prometheus repo itself (#1056)
* Add gofumpt to github workflow & fix all files for it

Signed-off-by: sazary <soroosh@azary.ir>

* Add goimports to golangci & fix it's issues

Signed-off-by: sazary <soroosh@azary.ir>

* Add revive to golangci & fix it's issues

Signed-off-by: sazary <soroosh@azary.ir>

* Add errcheck & misspell to golangci and fix their issues

Signed-off-by: sazary <soroosh@azary.ir>

* Add govet & gosimple to golangci and fix their issues

Signed-off-by: sazary <soroosh@azary.ir>

* Enable all default linters of golangci

Signed-off-by: sazary <soroosh@azary.ir>
2022-06-17 09:04:06 +02:00
Matt Layher 3afa5ab1e1
testutil/promlint: allow Kelvin as a base unit for color temperature
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2020-05-28 11:54:54 -04:00
beorn7 dc79bd6093 Improve various comments
Signed-off-by: beorn7 <beorn@grafana.com>
2020-04-25 15:59:53 +02:00
beorn7 6433bcf819 Add the capability to lint MetricFamilies directly
Also, change all the `dto.MetricFamily` arguments to pointers to be
more consistent with what we do in client_golang in general.

Signed-off-by: beorn7 <beorn@grafana.com>
2020-04-24 23:42:49 +02:00
RainbowMango 50cda505d1 fix static check warnings by Goland.
Signed-off-by: RainbowMango <renhongcai@huawei.com>
2020-04-24 10:15:27 +08:00
RainbowMango 3c5e60edc1 Porting promlint from prometheus/prometheus.
Signed-off-by: RainbowMango <renhongcai@huawei.com>
2020-04-23 14:09:29 +08:00