mirror of
https://github.com/prometheus/prometheus.git
synced 2025-12-06 10:01:02 +01:00
* Correctly generate rulesLintConfig when --lint=none is set (#17399) If I run promtool check config --lint=none I get: ``` Checking rules.yml FAILED: rules.yml: unset nameValidationScheme ``` This is because passing --lint=none stops newConfigLintConfig from generating rulesLintConfig which is needed for validation. It means that defaults are used then, one of which is unset value for metric name validation, causing this error. Fix this by handling --lint=none case correctly and still generating rulesLintConfig. --------- Signed-off-by: Lukasz Mierzwa <l.mierzwa@gmail.com> Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> Co-authored-by: Łukasz Mierzwa <l.mierzwa@gmail.com>