Arve Knudsen 92ccadc96d
promtool: generate rulesLintConfig when --lint=none is set (#17414)
* 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>
2025-10-28 14:34:52 +01:00
..
2021-06-12 12:47:47 +02:00
2023-09-25 17:48:05 +10:00