Commit Graph

7 Commits

Author SHA1 Message Date
Hrishikesh Barman 25074625b7 Add LintDuplicateMetric to promlint
Signed-off-by: Hrishikesh Barman <hrishikeshbman@gmail.com>
2024-03-16 12:12:08 +00:00
foehammer127 cead7c3bb2
feat(prometheus/testutil/promlint/validations): refine lintMetricTypeInName
Change the lintMetricTypeInName linter inside promlint to only trigger an error when the metric name matches the type of the metric.

Signed-off-by: foehammer127 <foehammer@disroot.org>
2024-02-29 11:10:22 -06: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
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
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