Skip to content
CAI
Software that uses CAICheck a score

inaka/erlang_guidelines

47.7

Weak · 23 September 2026

904

lines of production code

Erlang

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a repository of Erlang coding standards and best practices, providing a comprehensive set of guidelines for source code layout, syntax, and naming conventions. It includes concrete examples of 'good' and 'bad' implementations across various aspects of Erlang development, such as state management with gen\_server, function grouping, and dependency configuration. The project serves as a reference for enforcing code quality through linter configurations and documented rules.

Features

Added Erlang code style guidelines and examples

The src directory now contains a comprehensive set of Erlang source files that serve as examples of good and bad coding practices. These files cover a wide range of style rules, including variable and function naming conventions (camelCase vs snake\_case), avoiding nested try-catch blocks, preferring pattern matching over equality checks, and not using macros. The collection also includes guidelines for comment levels, indentation, line length (100 characters), and specific warnings about debug calls, timer:sleep in tests, and the use of timer:sleep in tests.

src · high confidence

Added example header files for record and type definitions

Three new header files have been added to the include directory: bad\_types.hrl defines example Erlang types (pos\_integer and proplist), nested.hrl demonstrates an include directive (noting that nesting is discouraged), and record\_sharing.hrl defines a record named 'bad'. These files serve as examples or test fixtures for record and type usage within the project.

include · high confidence

Added example naming modules for house and user entities

New Erlang modules have been introduced in the naming\_modules directory, providing example implementations for house and user entities. These include both 'good' and 'bad' variants, likely serving as reference templates or test cases for naming conventions within the application's domain model.

_src/naming\modules · high confidence

Initial release of Erlang coding standards and guidelines

The repository now includes a comprehensive set of Erlang coding standards and guidelines, covering source code layout, syntax, naming conventions, and best practices. This release establishes the foundational structure for the project, including configuration files for the elvis linter and rebar3 build system, a CHANGELOG, a LICENSE (Apache 2.0), and documentation files such as README.md, CONTRIBUTING.md, and REJECTED.md. The guidelines cover topics like avoiding deep nesting, using pattern matching, and proper module naming.

(repo-wide) · high confidence

Introduced new state management modules for tracking and incrementing values

Added two new Erlang modules, \bad\ and \good\, which implement \gen\_server\ behaviors to manage internal state. These modules provide APIs to start a process with an initial value, retrieve the current value, and increment the stored integer. The \good\ module specifically utilizes a record-based state structure for better encapsulation compared to the simpler \bad\ module.

src/state · high confidence

Behavioural changes

Added build configuration for dependencies

The priv directory now includes a Makefile and a rebar.config file that define build dependencies. The rebar.config explicitly lists 'bad' and 'good' as git-based dependencies, with 'bad' pointing to the master branch and 'good' pinned to version 1.0.0.

priv · medium confidence

Added code examples for function grouping best practices

Added three new Erlang modules (bad, better, good) in the src/grouping\_functions directory to illustrate different approaches to organizing public and private functions. The 'bad' module demonstrates mixing private and public functions, the 'better' module shows associated functions grouped together, and the 'good' module separates public and private functions with clear section headers.

_src/grouping\functions · medium confidence

Added example callback implementations

Added two new Erlang modules, 'bad' and 'good', in the callbacks directory. The 'bad' module provides a mock implementation of the behavior\_info callback, while the 'good' module defines a proper callback specification for function1.

src/callbacks · medium confidence

Updated dependency protocol examples to use HTTPS for Git repositories

The dependency protocol documentation and configuration examples have been corrected to use HTTPS URLs for Git repositories instead of SSH or other protocols. This change applies to both the Erlang-style configuration file and the Makefile-based build system, ensuring that dependency resolution uses the more secure HTTPS protocol for all Git-based dependencies.

_src/dependency\protocol · medium 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

Score

  • CAI 43 → 48 (+4.9)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 40 → 40 (+0.1)
  • Readiness 22 → 32 (+10.3)
  • Security 100 → 100 (+0.0)

Resolved (7)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • No exposed public API
  • Test reliability not included
  • complexity unreadable for .erl, .hrl — churn × complexity hotspots could not be measured
  • no production source files with tracked history to analyse
  • no production source files with tracked history to analyse

New (5)

  • Coverage not measured — no coverage collector is wired up
  • Dependency hygiene PARTLY measured — rebar3 pinning read, dependency currency not (no rebar.lock-pinned Hex declaration to grade)
  • Documentation: no installation or build instructions (README.md)
  • Floating source dependency: bad
  • Floating source dependency: good

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

inaka/erlang_guidelines 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 23 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 882f7f12b74b65066fdeff9bbe2197a3d6f8a713 — 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-955b9cee9818.