Skip to content
CAI
Software that uses CAICheck a score

hrzndhrn/recode

69.0

Adequate · 18 September 2026

5.9k

lines of production code

Elixir

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

Recode is an Elixir library that integrates with mix format to provide automatic code correction and linting through a modular, task-based architecture. It allows developers to configure and run specific transformations—such as alias expansion, pipe optimization, and debug removal—either via CLI commands or automatically during standard formatting. The system processes source files asynchronously, tracking issues and applying autocorrections while maintaining user configuration integrity.

How it got here

2021 — Initial scaffolding and task expansion

7 changes.

The project was initialized with core configuration, linting tools, and documentation, while the primary CLI task was removed to focus on a new suite of code quality and formatting tasks. Comprehensive test coverage was established using Mox mocks, and dependencies were overhauled to support the expanded feature set.

2022–2025 — Task-based architecture and tooling

16 changes.

The project underwent a major refactoring to adopt a modular, task-based architecture with native \mix format\ integration. This shift introduced a new configuration system, asynchronous task execution, and a suite of dedicated Mix commands for managing and running code transformations. Extensive test coverage and example projects were added to validate the new core components and demonstrate usage patterns.

Features

Add minimal and my\_code example projects

Two new example projects, \minimal\ and \my\_code\, have been added to the \examples\ directory to demonstrate the Recode tool. The \minimal\ example provides a basic configuration with a standard set of enabled tasks (such as AliasExpansion, Dbg, and PipeFunOne) and a simple test suite. The \my\_code\ example is a more comprehensive project featuring Credo linting, custom formatter plugins (FreedomFormatter and Recode.FormatterPlugin), Ecto migrations, and specific task configurations like AliasOrder, serving as a reference for integrating Recode into existing Elixir codebases.

examples · high confidence

Added example source files for code formatting tests

The example library now includes a set of new Elixir source files (such as alias\_expansion.ex, deep.ex, multi.ex, and trailing\_comma.ex) containing various code patterns. These files serve as test fixtures to demonstrate and verify the behavior of the Recode formatter, covering features like alias usage, pipe operators, control flow structures, and trailing commas.

_examples/my\_code/lib/my\code · high confidence

Added minimal example library and backup Mix task

The examples directory now includes a minimal library module providing a basic hello world function, alongside a new Mix task that allows users to create and restore project backups by serializing specified directories into a binary file.

_examples/minimal, examples/my\code/lib/mix · high confidence

Initial project scaffolding and configuration

The repository is initialized with essential project files, including a MIT license, Code of Conduct, and a detailed changelog. A default Credo linting configuration is added to enforce code style and design checks, alongside a Dialyzer ignore file. The project's own formatter is configured to handle \locals\_without\_parens\, and a sample \recode.exs\ configuration file is provided to demonstrate how to set up the linter tasks, such as alias expansion and line length enforcement, for users.

(repo-wide) · high confidence

New Recode Mix Tasks for Configuration and Help

This change introduces four new Mix tasks to the \recode\ tool: \mix recode\ (the main linter runner), \mix recode.gen.config\ (to generate a default \.recode.exs\ config file), \mix recode.help\ (to list available tasks and show documentation), and \mix recode.update.config\ (to merge and update existing configs while preserving user changes). The main \recode\ task supports options for autocorrection, dry mode, verbose output, and reading from stdin, and it validates configuration files, raising errors for outdated configs or missing tasks.

lib/mix/tasks · high confidence

New linting and formatting tasks for Elixir code

The \lib/recode/task\ directory now includes a comprehensive suite of new tasks that extend the \mix recode\ tool with additional code quality checks and automatic corrections. These new capabilities include \AliasOrder\ to enforce alphabetical sorting of aliases, \Dbg\ and \IOInspect\ to detect and remove debug calls, \EnforceLineLength\ to collapse multiline expressions, \FilterCount\ to optimize Enum usage, \Format\ to run the Elixir formatter, \LocalsWithoutParens\ to remove unnecessary parentheses, \Moduledoc\ to ensure module documentation exists, \Nesting\ to check code depth, \PipeChainStart\ to improve pipe readability, \SinglePipe\ to remove redundant pipes, \Specs\ to check for type specifications, \TagFIXME\ and \TagTODO\ to find TODO/FIXME comments, \TestFile\ to validate test file naming, \UnnecessaryIfUnless\ to simplify boolean logic, and \UnusedVariable\ to prefix unused variables with underscores. Additionally, existing tasks like \AliasExpansion\ and \PipeFunOne\ have been refactored to support autocorrection and improved configuration.

lib/recode/task · high confidence

Removals

Removal of the main Recode Mix task

The \Mix.Tasks.Recode\ module has been deleted, removing the primary command-line interface that previously allowed users to run code transformations (such as alias expansion and pipe function fixes) on Elixir source files. This change eliminates the ability to execute these recoding operations via the standard \mix recode\ command.

lib/mix/task · high confidence

Behavioural changes

Async task execution with structured error handling

The recode runner now executes tasks asynchronously using a task supervisor, allowing multiple source files to be processed in parallel. This change introduces structured error handling where exceptions during task execution are caught and recorded as issues on the source file rather than crashing the entire run, and it adds event management to notify listeners of task start/finish events and overall progress.

lib/recode/runner · high confidence

Recode 0.8.0 introduces a new task-based architecture with \`mix format\` integration

Recode has been refactored to use a new task-based architecture, replacing the previous implementation with a modular system where code transformations are defined as distinct tasks (e.g., \Recode.Task.AliasExpansion\, \Recode.Task.SinglePipe\). This version introduces a new configuration format (version 0.8.0) that allows users to enable, disable, or configure specific tasks via \.recode.exs\. A key feature is the new \Recode.FormatterPlugin\, which integrates Recode directly into \mix format\, allowing autocorrecting tasks to run automatically during standard formatting. The library now includes a dedicated application supervisor (\Recode.Application\) and an event-driven CLI formatter (\Recode.CLIFormatter\) for detailed output, along with a new \Recode.Context\ for AST traversal and issue tracking.

lib/recode · high confidence

Update module documentation and remove placeholder code

The Recode module's documentation has been updated to describe the library as a formatter and linter with autocorrection, replacing the previous generic placeholder text. Additionally, the sample 'hello' function and its associated documentation have been removed from the public API.

lib · high confidence

Test coverage

Added comprehensive test coverage for Recode core components; Added placeholder for PLT test support directory; Added test fixtures for Recode.Context; Added test fixtures for the rename task; Added test fixtures for the runner; Added test fixtures for valid and invalid task configurations; Added test support utilities for formatter and project testing; Added tests for Recode Mix tasks; Added tests for Recode task implementations; Added tests for Recode.Runner.Impl; Updated test infrastructure with Mox mocks and support files.

Dependencies

Recode dependency overhaul and example projects

The Recode project has replaced its previous dependencies (nimble\_options, sourceror) with a new stack including escape, glob\_ex, and rewrite (\~\> 1.2), while also adding dev/test tools like credo, dialyxir, ex\_doc, excoveralls, and mox. The minimum supported Elixir version is now 1.13. Additionally, two new example projects (minimal and my\_code) were added to demonstrate usage, with the minimal example targeting Elixir 1.17 and the my\_code example targeting Elixir 1.13.

(dependencies) · high confidence

Housekeeping

Added placeholder for tmp directory

A .keep file was added to the tmp directory to ensure the directory is tracked by version control.

tmp · 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 69.

Lenses

  • Code Health 96
  • Architecture 97
  • Maturity 55
  • Readiness 67
  • Security 96

Changes since last survey

  • 300 commits — 254 feature/other, 46 fixes

By area

  • (root) — 101 commits
  • lib/recode — 80 commits
  • (repo) — 41 commits
  • test/recode — 17 commits
  • examples/my_code — 16 commits
  • .github/workflows — 14 commits
  • lib/mix — 11 commits
  • priv/config.exs — 9 commits
  • test/formatter_plugin_test.exs — 4 commits
  • test/mix — 3 commits
  • test/fixtures — 2 commits
  • examples/minimal — 1 commit
  • test/support — 1 commit

Notable commits

  • fix: Fix --no-color
  • fix: Fix AliasExpansion
  • fix: Fix FormatterPlugin
  • fix: Fix Recode.Runner.run/2
  • fix: Fix Recode.Runner.run/3
  • fix: Fix alias MODULE, as: MyModule
  • fix: Fix alias order task
  • fix: Fix bug in Recode.Task.Tags
  • fix: Fix config test
  • fix: Fix config version
  • fix: Fix deps
  • fix: Fix doc
  • fix: Fix exclude_plugins
  • fix: Fix formatter plugin
  • fix: Fix requirement
  • fix: Fix spec
  • fix: Fix tags task issue (#92)
  • fix: Fix task selection
  • fix: Fix tasks tags and alias_order
  • fix: Fix test
  • …and 280 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

hrzndhrn/recode 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 d239a9aaf6d1f2a2630cf931869d0b734334ac4f — 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.