zotonic/template_compiler
69.8
Adequate · 15 November 2026
5.6k
lines of production code
Erlang
primary language
4
measurements over time
What this system is
Features
Add template compiler record definition
Added the \template\_compiler.hrl\ header file which defines the \template\_file\ record. This record stores the template content as a binary and the source filename, providing the necessary data structure for the template compiler module.
include · high confidence
Template compiler gains syntax highlighting, debug points, and structured rendering API
The template compiler now provides a syntax-highlighted HTML view of template source files and compiled modules via the new \template\_compiler\_highlight\ module, enabling developers to inspect template structure and debug points directly in the browser. The core compiler API has been expanded with \render/4\, \render/5\, and \render\_block/5\ functions to support more flexible template rendering and block-level execution. Additionally, the system now supports compile-time debug points, allowing for runtime tracing of template variables and execution flow, and introduces a \translations/1\ callback to extract translatable strings from templates for easier localization management.
src · high confidence
Behavioural changes
Upgrade to OTP 22+ and replace lager with logger
The template compiler now requires Erlang/OTP 22 or later, dropping support for older versions. As part of this modernization, the logging dependency has been switched from lager to the standard Erlang logger, and the project dependencies have been updated to use Hex packages (zotonic\_stdlib and qdate\_localtime) instead of direct git references.
(repo-wide) · high confidence
Test coverage
Added template compiler test fixtures; Expanded test coverage for template compiler features.
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 70 → 70 (-0.2)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.
Lenses
- Code Health 59 → 59 (+0.1)
- Architecture 100 → 100 (+0.0)
- Maturity 82 → 83 (+1.1)
- Readiness 70 → 70 (+0.0)
- Security 94 → 90 (-4.6)
Resolved (2)
- Hotspot: src/template_compiler_expr.erl (src/template_compiler_expr.erl)
- Medium CVE: EEF-[CVE redacted] (rebar.lock)
New (12)
- Edited copy of a member (10 corresponding lines) (src/template_compiler_plural.erl)
- Edited copy of a member (10 corresponding lines) (src/template_compiler_scanner.erl)
- Edited copy of a member (16 corresponding lines) (src/template_compiler_runtime.erl)
- Edited copy of a member (17 corresponding lines) (src/template_compiler_plural.erl)
- Edited copy of a member (18 corresponding lines) (src/template_compiler_expr.erl)
- Edited copy of a member (26 corresponding lines) (src/template_compiler.erl)
- Edited copy of a member (41 corresponding lines) (src/template_compiler_element.erl)
- Edited copy of a member (8 corresponding lines) (src/template_compiler.erl)
- Edited copy of a member (9 corresponding lines) (src/template_compiler_expr.erl)
- Edited copy of a member (9 corresponding lines) (src/template_compiler_operators.erl)
- Medium CVE: EEF-[CVE redacted] (rebar.lock)
- Medium CVE: EEF-[CVE redacted] (rebar.lock)
Changes since last survey
- 1 commits — 1 feature/other, 0 fixes
By area
- (root) — 1 commit
Notable commits
- change: Add support for plural translations and msgctxt support (#74)
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
zotonic/template_compiler 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 15 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 622a34bb143c490435dfa554975e91d84d22b72c — the exact code this score is about.
- Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-3c33c1882dc1.