• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dnsimple / dns_erlang / 21398538190
85%

Build:
DEFAULT BRANCH: main
Ran 27 Jan 2026 01:13PM UTC
Jobs 1
Files 12
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Jan 2026 01:12PM UTC coverage: 84.905% (-0.3%) from 85.221%
21398538190

push

github

web-flow
Implement encoding DNS presentation format (#104)

It has, my favourite thing, property based testing to check that the inverse of encoding is decoding.

It is horrendously verbose though, but it hopefully perfectly RFC compliant and very very comprehensive.

It also splits the dns_zone module into two, all old code related to reading zonefiles moved to a hidden helper module called dns_zone_decode. (done in #105) This only implements a couple more record types that weren't implemented earlier but for which wire transcoding already existed.

How to review? The dns_zone_encode module itself is actually not really complicated, it only has one massive function with dozens of clauses, one for each record type. Everything else is rather obvious, and for this god-function, we can just check the record we like the most. Tests might be a lot more verbose than needed, cursor helped a lot generating them so more may have escaped that I could review, I focused on working on the code and making sure coverage was high.

* Split dns zone parsing logic into helper module

* Implement record types that wire transcoding supports but zone decode did not yet

* Implement zonefile encode

- Create dns_zone_encode.erl module for encoding DNS records to zone format
- Implement encode_rr/1,2 in dns_zone.erl public API
- Add encode_options type definition
- Implement encoding for: A, AAAA, NS, CNAME, PTR, MX, TXT, SPF, SOA, SRV, CAA
- Add helper functions: encode_dname, encode_quoted_string, encode_ttl
- Support relative names and @ symbol when origin is set
- Implement encoding for service types: NAPTR, HINFO, RP, AFSDB, RT, KX, DNAME, MB, MG, MR, MINFO
- Implement encoding for DNSSEC types: DS, CDS, DLV, DNSKEY, CDNSKEY, RRSIG, NSEC, NSEC3, NSEC3PARAM
- Implement encoding for security types: SSHFP, TLSA, SMIMEA, CERT, DHCID, OPENPGPKEY, WALLET
- Implement encoding for SVCB/HTTPS with service parameter encoding
- Implement encoding for other types: URI, RESINFO, EUI48, EUI6... (continued)

383 of 468 new or added lines in 3 files covered. (81.84%)

3178 of 3743 relevant lines covered (84.91%)

3969.48 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
36
89.53
src/dns_zone_encode.erl
49
80.37
-3.75% src/dns_zone_decode.erl
Jobs
ID Job ID Ran Files Coverage
1 21398538190.1 27 Jan 2026 01:13PM UTC 12
84.91
GitHub Action Run
Source Files on build 21398538190
  • Tree
  • List 12
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #21398538190
  • bcc52378 on github
  • Prev Build on main (#21312372218)
  • Next Build on main (#21399197388)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc