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

dnsimple / dns_erlang / 22858811976
89%

Build:
DEFAULT BRANCH: main
Ran 09 Mar 2026 02:42PM UTC
Jobs 1
Files 13
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

09 Mar 2026 02:40PM UTC coverage: 87.731% (+2.9%) from 84.812%
22858811976

push

github

web-flow
refactor(dnssec): optimize maps, types, and canonicalization (#115)

* Pin working version of elvis

* refactor(dnssec): optimize maps, types, and canonicalization

- Relax elvis private_data_types check for dnssec in rebar.config so
  exported dnssec-specific types are lint-clean.

- Expose opaque DNSSEC record type aliases from dnssec:
  - ds() :: #dns_rrdata_ds{}
  - dnskey() :: #dns_rrdata_dnskey{}
  - rrsig() :: #dns_rrdata_rrsig{}
  - nsec() :: #dns_rrdata_nsec{}
  - nsec3() :: #dns_rrdata_nsec3{}

- Remove the test-only export of normalise_dname/1 from dnssec and use
  dns_domain:to_lower/1 directly where needed.

- Simplify NSEC generation:
  - gen_nsec/4 now lowercases the zone name with dns_domain:to_lower/1.
  - Build the type-class map directly from build_rrmap_gbt/2 instead of
    going through an intermediate {Key, Types} list.
  - Use map comprehensions (Key := Value) instead of maps:to_list/1 in
    gen_nsec/4.

- Rework NSEC3 generation to be more map-centric:
  - Use maps:fold/3 instead of lists:foldl/3 over the intermediate map.
  - Introduce a type_classes() alias (#{{dns:dname(), dns:class()} =>
    [dns:type()]}) and use it in specs for build_rrmap/3,
    build_rrmap_nonterm/3, and build_rrmap_gbt/3.
  - Replace the old build_rrmap_nonterm/3 recursion with
    build_rrmap_nonterm_for_each_class/3 so all ancestor names are added
    per class without prematurely exiting once a key already exists.

- Streamline RR-set normalization:
  - build_rrmap_gbt/3 specs now use dns:type() instead of raw integers.
  - Refactor rrs_to_rrsets/3 to collect RR sets directly from the maps:
    - Use Key := Datas <- RRSets instead of maps:to_list/1.
    - Extract construction into finalise_rrs_to_rrsets/3 (new helper)
      with a clearer spec.

- Make signature input building more structured:
  - Change build_sig_input/6 and build_sig_input/7 to take the RR list
    first ([dns:rr(), ...]) and then signer name, key tag, algorithm,
    inception, a... (continued)

36 of 38 new or added lines in 1 file covered. (94.74%)

2710 of 3089 relevant lines covered (87.73%)

3449.12 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
94.67
21.9% src/dnssec.erl
Jobs
ID Job ID Ran Files Coverage
1 22858811976.1 09 Mar 2026 02:42PM UTC 13
87.73
GitHub Action Run
Source Files on build 22858811976
  • Tree
  • List 13
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #22858811976
  • 1a59d8f2 on github
  • Prev Build on main (#21867751227)
  • Next Build on main (#22862560745)
  • 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