From d046b9da6b9e89db949fe695b2b9e6b27f20397a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Villase=C3=B1or=20Montfort?= <195970+montfort@users.noreply.github.com> Date: Tue, 19 May 2026 19:00:01 -0600 Subject: [PATCH 1/2] =?UTF-8?q?chore:=20bump=20arborist-metrics=200.1.2=20?= =?UTF-8?q?=E2=86=92=200.1.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream library was renamed `arborist` → `arborist-metrics` (package name) but the lib name (`arborist`) and public API are unchanged, so no source imports require updates. v0.1.3 adds SPDX headers and README sections (AI/Copyright) — no API or behavior changes. Co-Authored-By: Claude Opus 4.7 (1M context) --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 867b1ad..5dcc7a7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -101,9 +101,9 @@ dependencies = [ [[package]] name = "arborist-metrics" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "331cbe5ffbe109ef83f41b6ebb8f1ccda184a4b7a36552e3f6c7bd8459565141" +checksum = "dcd6cbeab072c9f91f2b170fcd1061ebe7e76db15778c7fbd0b1777cefb165b5" dependencies = [ "serde", "tree-sitter", diff --git a/Cargo.toml b/Cargo.toml index 3806a03..62bd305 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ name = "arborist" path = "src/main.rs" [dependencies] -arborist-metrics = { version = "0.1", features = ["all"] } +arborist-metrics = { version = "0.1.3", features = ["all"] } clap = { version = "4", features = ["derive"] } serde = { version = "1", features = ["derive"] } serde_json = "1" From 339b9e34b42d8f22c522463b2061ddff224a6a8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Villase=C3=B1or=20Montfort?= <195970+montfort@users.noreply.github.com> Date: Tue, 19 May 2026 19:03:21 -0600 Subject: [PATCH 2/2] =?UTF-8?q?fix(clippy):=20switch=20sort=5Fby=20?= =?UTF-8?q?=E2=86=92=20sort=5Fby=5Fkey=20for=20unnecessary=5Fsort=5Fby=20l?= =?UTF-8?q?int?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rust 1.95 promotes `clippy::unnecessary_sort_by` which fails on descending sorts written as `sort_by(|a, b| b.x.cmp(&a.x))`. The idiomatic form uses `sort_by_key(|b| std::cmp::Reverse(b.x))`. Behavior is identical; only the lint is satisfied. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/analysis.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/analysis.rs b/src/analysis.rs index e426eee..2cb98f3 100644 --- a/src/analysis.rs +++ b/src/analysis.rs @@ -120,9 +120,9 @@ pub fn sort_and_top( use crate::cli::SortMetric; match sort { - SortMetric::Cognitive => flat.sort_by(|a, b| b.cognitive.cmp(&a.cognitive)), - SortMetric::Cyclomatic => flat.sort_by(|a, b| b.cyclomatic.cmp(&a.cyclomatic)), - SortMetric::Sloc => flat.sort_by(|a, b| b.sloc.cmp(&a.sloc)), + SortMetric::Cognitive => flat.sort_by_key(|b| std::cmp::Reverse(b.cognitive)), + SortMetric::Cyclomatic => flat.sort_by_key(|b| std::cmp::Reverse(b.cyclomatic)), + SortMetric::Sloc => flat.sort_by_key(|b| std::cmp::Reverse(b.sloc)), SortMetric::Name => flat.sort_by(|a, b| a.name.cmp(&b.name)), }