Skip to content

Releases

Arborist v0.1.3

Choose a tag to compare

@montfort montfort released this 20 May 00:03
1c6e0a1

Added

  • New Built with AI · Powered by StrayMark section in README acknowledging
    the project's AI-assisted development process and its use of
    StrayMark — a CLI for cognitive discipline in
    AI-assisted engineering — for decision tracking and governance.
  • New Copyright section in README identifying Strange Days Tech S.A.S. de
    C.V. (strangedays.tech) as the original author
    and intellectual-property holder.
  • SPDX-License-Identifier: MIT OR Apache-2.0 header with copyright
    attribution on every Rust source file in the library, in line with Rust
    ecosystem conventions.

Arborist v0.1.2

Choose a tag to compare

@montfort montfort released this 20 May 00:03
b13447b

Fixed

  • Move exclude list from [lib] to [package] in Cargo.toml, reducing published
    crate size from 1.2 MiB (287 files) to 242 KiB (138 files).

Arborist v0.1.1

Choose a tag to compare

@montfort montfort released this 20 May 00:03
b413709

Changed

  • Restructure Feature Flags section in README: move before Installation, expand with
    per-language table showing feature flag, tier, and tree-sitter crate mapping.
  • Add Default column to Supported Languages table (Yes / Opt-in).
  • Add [package.metadata.docs.rs] with all-features = true so docs.rs renders
    documentation for all 12 languages.
  • Add actionable doc comment on LanguageNotEnabled error with Cargo.toml fix examples.
  • Add module-level documentation to src/languages/mod.rs explaining the feature gate
    system and tier structure.

Arborist v0.1.0

Choose a tag to compare

@montfort montfort released this 31 Mar 04:28
7786708

Arborist v0.1.0

Multi-language code complexity metrics powered by tree-sitter.

Computes cognitive complexity (SonarSource), cyclomatic complexity (McCabe), and source lines of code (SLOC) for functions and methods — all from a single, embeddable Rust library.

Supported Languages (12)

Tier Languages Feature flags
Tier 1 (default: ★) Rust★, Python★, JavaScript★, TypeScript★, Java★, Go★, C#, C++, C, PHP default = 6 most popular
Tier 2 Kotlin, Swift kotlin, swift

features = ["all"] enables all 12 languages.

Highlights

  • SonarSource-compliant cognitive complexity: nesting penalties, boolean operator sequences, flat else-if, lambda nesting, recursive call detection
  • McCabe cyclomatic complexity: per-arm counting for match/switch constructs
  • Feature-gated compilation: only compile the grammars you need
  • JSON serialization: FileReport and FunctionMetrics implement Serialize/Deserialize
  • Configurable thresholds: flag functions exceeding a cognitive complexity limit
  • 177 tests across all languages, clippy clean

Installation

[dependencies]
arborist = "0.1"                    # default: Rust, Python, JS, TS, Java, Go
arborist = { version = "0.1", features = ["all"] }  # all 12 languages

Quick Example

use arborist::{analyze_file, FileReport};

let report: FileReport = analyze_file("src/main.rs")?;
for func in &report.functions {
    println!("{}: cognitive={}, cyclomatic={}, sloc={}",
        func.name, func.cognitive, func.cyclomatic, func.sloc);
}

Known Limitations

  • Recursion detection is not supported for Kotlin and Swift (their tree-sitter grammars lack a named field on call expression nodes)
  • Halstead metrics are planned for v0.2.0

Full Changelog

https://github.com/StrangeDaysTech/arborist/commits/v0.1.0