Feature Request
When dns-sync validate, plan, or apply reports a zone validation error, it currently shows the record name and type but not the location in the YAML file:
✗ araelespinosa.dev. MX (priority 10): exchange value is empty
It would be more helpful to also show the file and line number:
✗ araelespinosa.dev. MX (priority 10): exchange value is empty
→ zones/araelespinosa.dev.yaml:14
Implementation notes
This requires propagating source location metadata (file path + line number) from the YAML parser through to the DnsRecord model. YamlDotNet supports this via IYamlTypeConverter and Mark objects on parser events.
Rough approach:
- Add an optional
SourceLocation property to DnsRecord (file path + line number)
- Populate it in
YamlProvider.ParseZoneYaml using YamlDotNet's low-level parser API or a post-parse mapping
- Include it in
ZoneValidator error messages when present
Non-trivial — the current parser uses high-level deserialization which discards position info. Switching to the low-level API or a custom converter would be needed.
Feature Request
When
dns-sync validate,plan, orapplyreports a zone validation error, it currently shows the record name and type but not the location in the YAML file:It would be more helpful to also show the file and line number:
Implementation notes
This requires propagating source location metadata (file path + line number) from the YAML parser through to the
DnsRecordmodel. YamlDotNet supports this viaIYamlTypeConverterandMarkobjects on parser events.Rough approach:
SourceLocationproperty toDnsRecord(file path + line number)YamlProvider.ParseZoneYamlusing YamlDotNet's low-level parser API or a post-parse mappingZoneValidatorerror messages when presentNon-trivial — the current parser uses high-level deserialization which discards position info. Switching to the low-level API or a custom converter would be needed.