cloudflare/pint
Publicmirrored from https://github.com/cloudflare/pintAvailable
docs/examples/parser.hcl
33lines · modecode
| 1 | # Example parser configuration for non-standard rule files. |
| 2 | # Use this when your rules are embedded in other YAML structures |
| 3 | # or when you need Thanos schema support. |
| 4 | |
| 5 | parser { |
| 6 | # Use Thanos rule schema instead of Prometheus. |
| 7 | # This allows 'partial_response_strategy' on rule groups. |
| 8 | schema = "thanos" |
| 9 | |
| 10 | # Validate label names using legacy ASCII-only rules. |
| 11 | # Default is "utf-8". |
| 12 | names = "legacy" |
| 13 | |
| 14 | # Only check files inside these paths. |
| 15 | include = [ |
| 16 | "rules/.+", |
| 17 | "alerts/.+", |
| 18 | ] |
| 19 | |
| 20 | # Skip markdown and text files that might be in the same directories. |
| 21 | exclude = [ |
| 22 | ".+\\.md", |
| 23 | ".+\\.txt", |
| 24 | ] |
| 25 | |
| 26 | # Parse files matching these patterns in relaxed mode. |
| 27 | # Relaxed mode finds rule definitions anywhere in the file |
| 28 | # without requiring strict groups -> rules -> rule structure. |
| 29 | relaxed = [ |
| 30 | "services/.+\\.yaml", |
| 31 | "kustomize/.+\\.yml", |
| 32 | ] |
| 33 | } |
| 34 | |