From 10acb9d2714bb5c7f4056c7b12aa7ee47a4e85bf Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Sat, 21 Nov 2026 17:48:44 +0100 Subject: [PATCH 1/2] Always open a unit space for the root of the tree When error recovery makes the root of the tree an ERROR node, no space was opened for it, so the first space found below it became the root and absorbed all the following ones: the metrics of the whole file were reported as the ones of its first function, spanning only that function's lines (e.g. sloc 1 and negative blank lines). The root now always opens a unit space, unless it's already a space. Fixes #1260. --- src/spaces.rs | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/src/spaces.rs b/src/spaces.rs index 46e862a0e..b10092976 100644 --- a/src/spaces.rs +++ b/src/spaces.rs @@ -290,6 +290,7 @@ pub fn metrics<'a, T: ParserTrait>(parser: &'a T, path: &'a Path) -> Option(parser: &'a T, path: &'a Path) -> Option Date: Sat, 21 Nov 2026 17:52:59 +0100 Subject: [PATCH 2/2] Update the rca-output submodule for the unit space of ERROR roots The roots of DeepSpeech's kenlm/lm/model.hh and of the two pywrapfst.cc files are now units spanning the whole file (mozilla/rust-code-analysis-output#7). --- tests/repositories/rca-output | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/repositories/rca-output b/tests/repositories/rca-output index e4c6df0f5..f00d7c7bf 160000 --- a/tests/repositories/rca-output +++ b/tests/repositories/rca-output @@ -1 +1 @@ -Subproject commit e4c6df0f5fbefd7a9ba000a550f0ad3ea1d6400b +Subproject commit f00d7c7bfb24184b930eb088b43ea03324c60341