emqx/hocon
63.9
Adequate · 2 October 2026
8.1k
lines of production code
Erlang
primary language
2
measurements over time
What this system is
This system is an Erlang/OTP library that provides a parser and schema validation framework for HOCON configuration files. It enables type-safe configuration management by mapping HOCON keys to Erlang terms, supporting features like variable substitution, byte-size units, and complex type unions. The project includes a CLI tool for converting configurations to Erlang sys.config format and offers integration examples for EMQX authentication plugins.
Features
Add Elvis linter caching and HOCON-to-JSON generation scripts
The repository now includes two new automation scripts. The \scripts/elvis-check.sh\ script manages the Elvis static analysis tool (version 3.2.6-emqx-1), implementing a caching mechanism using a lock file to avoid re-downloading the binary if the version and SHA-256 checksum match a previously cached state. The \scripts/generate-json.sh\ script automates the conversion of HOCON configuration files to JSON using a specific \hoc2js\ JAR (v1.1-fix), while explicitly skipping \test01.conf\ to prevent exposing local home directory paths in the output.
scripts · high confidence
Add HOCON schema definitions and Cuttlefish conversion modules for EMQX authentication plugins
The sample-schemas area now includes HOCON schema definitions and corresponding Erlang conversion modules for the EMQX authentication plugins (HTTP, JWT, LDAP, Mnesia, and MongoDB). These new files provide structured configuration schemas that map user-facing settings to internal application options, enabling consistent validation and translation of configuration data for these authentication backends.
sample-schemas · high confidence
Add example OTP application demonstrating HOCON configuration management
Introduces a new example OTP application that showcases how to use HOCON for configuration management. The change includes the application source code (app, app behavior, supervisor, and schema definitions), a HOCON configuration file defining HTTP/HTTPS listeners and user limits, an entrypoint script to generate sys.config and vm.args from the HOCON schema, and the necessary build configuration (rebar.config) to package the release with the hocon dependency.
example, example/apps/example · high confidence
Added HTML documentation template
A new HTML template file has been added to the project's private resources directory. This template defines the structure and styling for generated documentation, including a two-column layout with a fixed sidebar for the index and a main content area for structs, utilizing specific CSS styles for typography and layout.
priv · high confidence
Initial release of HOCON parser and schema validation framework
This commit introduces the core HOCON parser and the \hocon\_schema\ type-safe validation framework for Erlang/OTP. The parser supports HOCON features including unquoted strings, value concatenation, multiline strings with indentation, and environment variable interpolation. The schema module provides a cuttlefish-compatible API for defining data structures, mapping HOCON keys to Erlang terms, and performing integrity validations. A new CLI tool (\hocon\_cli\) is included to convert HOCON configurations to Erlang \sys.config\ format, and the project sets up build tooling with rebar3, elvis, and erlfmt.
(repo-wide) · high confidence
Initial release of the HOCON configuration library
This change introduces the core HOCON (Human-Optimized Config Object Notation) library for Erlang. It includes a new lexer and parser (hocon\_scanner.xrl, hocon\_parser.yrl) capable of handling standard HOCON syntax, including variable substitution, concatenation, and multi-line strings. The library provides a schema validation engine (hocon\_schema) with support for type checking, translations, and validations, alongside a CLI interface (hocon\_cli) for configuration management and an escript for generating documentation. Post-processing utilities (hocon\_postprocess) are included to handle specific types like durations, bytesizes, and percentages.
src · high confidence
Behavioural changes
Expanded configuration capabilities and new sample files in etc/
The etc/ directory now includes a comprehensive set of new sample configuration files (such as emqx.conf, emqx.cuttlefish.conf, and various schema/test examples) that demonstrate support for new HOCON parser features. These changes enable users to utilize byte-size units (e.g., '256b', '1KB'), required includes via the required() syntax, and symlinked configuration files. Additionally, the directory now contains specific test fixtures for error handling (concat, resolve, trailing commas) and Unicode/UTF-8 encoding, reflecting underlying parser improvements in handling these data types and structures.
etc · high confidence
New HOCON schema header files define types, macros, and importance levels
The include directory now provides a set of new header files (hocon.hrl, hocon\_private.hrl, hocon\_types.hrl, and hoconsc.hrl) that establish the foundational macros and type definitions for the HOCON schema system. These headers introduce support for complex types such as unions, enums, lazy types, and remote references, alongside metadata handling macros. Additionally, they define an importance enum (high, medium, low, no\_doc, hidden) to control documentation visibility and default value filling, replacing the previous boolean hidden flag mechanism.
include · high confidence
Test coverage
Add compatibility test fixtures and schema for mixed union types; Added sample configuration files for parser testing.
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
Score
- CAI 58 → 64 (+6.1)
- Rubric changed (rubric-2026.09.12 → rubric-2026.09.18) — scores are not directly comparable.
Lenses
- Code Health 92 → 92 (+0.0)
- Architecture 100 → 100 (+0.0)
- Maturity 44 → 57 (+12.1)
- Readiness 54 → 55 (+0.6)
- Security 77 → 82 (+4.2)
Resolved (5)
- Coverage not measured — no coverage collector is wired up
- Documentation: hard to navigate (docs/hocon.md)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Off-boarding risk: anonymized user #1
New (5)
- Dependency hygiene PARTLY measured — rebar3 pinning read, dependency currency not (no rebar.lock-pinned Hex declaration to grade)
- No ADRs found
- No dependency lockfile committed (example/rebar.config)
- No dependency lockfile committed (rebar.config)
- Off-boarding risk: anonymized user #1
Changes since last survey
- 11 commits — 8 feature/other, 3 fixes
By area
- (repo) — 7 commits
- src/hocon_schema_builtin.erl — 2 commits
- src/hocon_tconf.erl — 2 commits
Notable commits
- fix: fix(schema): reject a binary value which is not UTF-8
- fix: fix(schema): reject a binary value which is not UTF-8
- fix: fix(tconf): keep an unselectable union value in a partial check
- change: Merge pull request #326 from zmstone/260920-non-utf8-binary
- change: Merge pull request #327 from zmstone/260921-partial-check
- change: Merge pull request #328 from zmstone/260922-sync-0.46.7-to-master
- change: Merge pull request #329 from zmstone/260922-partial-union
- change: Merge pull request #330 from zmstone/260922-sync-0.46.8-to-master
- change: Merge tag '0.46.7' into master
- change: Merge tag '0.46.8' into master
- change: feat(tconf): add the partial check option
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
emqx/hocon 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 2 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 7759b15cd002033e3242b6c8cd8962a3480f10da — the exact code this score is about.
- Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.