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

xu-chris / toon_ex / 45581c8dffdd6a4b56077620d5c1a98ec683ef47-PR-14
68%
main: 68%

Build:
Build:
LAST BUILD BRANCH: fix/type-specs-for-encoder-protocol
DEFAULT BRANCH: main
Ran 21 Jan 2026 11:40AM UTC
Jobs 1
Files 19
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

21 Jan 2026 11:39AM UTC coverage: 67.867%. Remained the same
45581c8dffdd6a4b56077620d5c1a98ec683ef47-PR-14

Pull #14

github

Chris Xu
fix(types): accept term() for encoder input to support structs

The Toon.Encoder protocol normalizes input before encoding, so the
public API should accept any term() - not just pre-normalized types.

Changes:
- Add Toon.Types.input() type as term() for encoder parameters
- Update encode/1,2 and encode!/1,2 specs to use input()
- Keep encodable() for normalized output (string-keyed maps)
- Add tests for struct and atom-key encoding via public API

This fixes Dialyzer warnings when calling Toon.encode!/1 with:
- Ecto schemas (structs with atom keys)
- Maps with atom keys
- Any type implementing the Toon.Encoder protocol

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Pull Request #14: Fix type specs to accept structs and atom-keyed maps

716 of 1055 relevant lines covered (67.87%)

19.48 hits per line

Jobs
ID Job ID Ran Files Coverage
1 45581c8dffdd6a4b56077620d5c1a98ec683ef47-PR-14.1 21 Jan 2026 11:40AM UTC 19
67.87
GitHub Action Run
Source Files on build 45581c8dffdd6a4b56077620d5c1a98ec683ef47-PR-14
  • Tree
  • List 19
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #14
  • PR Base - main (#039BD557...)
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