Skip to content
CAI
Software that uses CAICheck a score

emqx/hocon

67.3

Adequate · 15 November 2026

8.2k

lines of production code

Erlang

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

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 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 65 → 67 (+2.7)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 74 → 74 (-0.8)
  • Architecture 100 → 100 (+0.0)
  • Maturity 60 → 60 (+0.0)
  • Readiness 58 → 65 (+7.3)
  • Security 84 → 90 (+6.7)

Resolved (6)

  • High secret: WD-SECRET-0002 (sample-configs/json/test05.conf.json)
  • Leaked secret: signing-key (sample-configs/json/test05.conf.json)
  • No ADRs found
  • Off-boarding risk: anonymized user #1
  • Rotate the exposed credentials — git history can't be un-committed
  • Secret: generic-api-key (sample-configs/test05.conf)

New (14)

  • Edited copies of one member (3 members, 18+ corresponding lines) (sample-schemas/emqx_auth_mysql_schema.erl)
  • Edited copy of a member (10 corresponding lines) (src/hocon.erl)
  • Edited copy of a member (10 corresponding lines) (src/hocon_cli.erl)
  • Edited copy of a member (11 corresponding lines) (src/hocon_schema_example.erl)
  • Edited copy of a member (14 corresponding lines) (src/hocon_tconf.erl)
  • Edited copy of a member (15 corresponding lines) (sample-schemas/emqx_auth_mongo_schema.erl)
  • Edited copy of a member (2 corresponding lines) (src/hocon_schema.erl)
  • Edited copy of a member (3 corresponding lines) (src/hocon_md.erl)
  • Edited copy of a member (3 corresponding lines) (src/hocon_tconf.erl)
  • Edited copy of a member (4 corresponding lines) (sample-schemas/demo_schema2.erl)
  • Edited copy of a member (4 corresponding lines) (src/hocon.erl)
  • Edited copy of a member (7 corresponding lines) (sample-schemas/emqx_auth_mnesia_schema.erl)
  • No ADRs found (rebar.config)
  • Off-boarding risk: anonymized user #1

Written by cca.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 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 5170a5aa591cdf2ef07c35d8ad89b7b2d26df5bd — 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.