appcues/exconstructor
55.5
Adequate · 18 September 2026
263
lines of production code
Elixir
primary language
1
measurement over time
What this system is
ExConstructor is an Elixir library that simplifies struct initialization by automatically mapping input data into struct fields. It supports flexible key formats, including camelCase, snake\_case, atoms, and UpperCamelCase, with configurable options for each module. The system allows developers to define constructors before or after struct declarations and provides comprehensive test coverage for its mapping and configuration logic.
Behavioural changes
ExConstructor now supports invocation before defstruct
Version 1.3.0 allows developers to place the \use ExConstructor\ macro before the \defstruct\ statement, removing the previous requirement that it appear after. This change simplifies struct definitions by making the constructor injection independent of declaration order. The release also updates the project's tooling to require Elixir 1.19.4 and Erlang 28.2, and includes documentation and README improvements.
(repo-wide) · high confidence
Migrate configuration syntax to Elixir 1.10+ import Config
The application configuration has been updated to use the modern \import Config\ syntax instead of the deprecated \use Mix.Config\. This change aligns the codebase with current Elixir standards, ensuring compatibility with newer versions of the language and its build tools while maintaining the same configuration behavior for the user.
config · high confidence
Support for UpperCamelCase keys and configurable key-format options
ExConstructor now automatically maps struct fields from input data using UpperCamelCase keys (e.g., \FieldFour\) in addition to the existing camelCase, snake\_case, and atom support. This capability is controlled by the new \Options\ struct, which allows users to enable or disable specific key-format checks (strings, atoms, camelcase, uppercamelcase, underscore) via the \use ExConstructor\ macro or by passing options to \populate\struct/3\. The library also introduces a \\\using\\_/1\ macro that supports passing a custom constructor name or a keyword list of default options, making the constructor behavior configurable per module.
lib · high confidence
Test coverage
Added comprehensive test suite for ExConstructor
Added extensive unit tests for the ExConstructor library, covering the \populate\_struct\ function's handling of various input formats (maps with string/atom keys, camelCase/underscore conversions, keyword lists) and its \Options\ configuration. The tests also verify multiple invocation styles (\use ExConstructor\, \define\constructor\, \\\using\\_\), custom constructor names, error handling for invalid inputs, and compatibility with \@enforce\_keys\ and struct definition ordering.
test · high confidence
Dependencies
Upgrade to Elixir 1.18 and update project metadata
The project now requires Elixir 1.18, replacing the previous minimum version of 1.2. The package metadata has been updated to version 1.3.3, including the addition of a description, maintainer information, license details, and repository links. Development dependencies for documentation (ExDoc, Earmark) and static analysis (Dialyxir) have been refreshed to their latest compatible versions, and the application configuration has been modernized to use \extra\_applications\ instead of the deprecated \applications\ key.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 56.
Lenses
- Code Health 100
- Architecture 69
- Maturity 31
- Readiness 76
- Security 96
Changes since last survey
- 106 commits — 97 feature/other, 9 fixes
By area
- (root) — 66 commits
- (repo) — 23 commits
- lib/exconstructor.ex — 10 commits
- test/exconstructor_test.exs — 4 commits
- .circleci/config.yml — 3 commits
Notable commits
- fix: Fix for when key format is in UpperCamelCase
- fix: Fix typespec for populate_struct/2 (#30)
- fix: Merge pull request #4 from meowy/fix-arity
- fix: Merge pull request #62 from appcues/fix-deprecation-warn
- fix: Merge pull request #64 from appcues/fix-mix-docs
- fix: fix elixir warning 'warning: negative steps are not supported in String.slice/2, pass 1..-1//1 instead' bump version
- fix: fixed warnings on Elixir 1.4
- fix: typo fix
- fix: typo fix in README
- change: 1.0.0
- change: 1.1.0
- change: 1.2.1
- change: 1.2.10
- change: 1.2.16
- change: 1.2.2
- change: 1.2.3
- change: 1.2.4
- change: 2021 Spring Cleaning (#27)
- change: Add missing arity to defoverridable invocation
- change: Add unit test
- …and 86 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
appcues/exconstructor was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 18 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit d112253be6cc9b0b7a1dba8bd0ecbb42ab1f641c — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-5d04157a340d.