Skip to main content

Crate braintax

Crate braintax 

Source
Expand description

§braintax

A minimal utility crate for estimating the cognitive “tax” of code patterns.

This crate provides a simple scoring function that quantifies how mentally taxing a given code structure is, based on nesting depth and branching complexity. It is designed as a lightweight companion to complexity analysis tools like crap4rust.

§Example

use braintax::Braintax;

let score = Braintax::new()
    .with_nesting(3)
    .with_branches(5)
    .compute();

assert!(score > 0);

Structs§

Braintax
A cognitive “tax” estimator that combines nesting depth and branching complexity into a single score.