Repository navigation
Always open a unit space for the root of the tree - #1263
Merged
Merged
Conversation
This was referenced Nov 21, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1263 +/- ##
==========================================
- Coverage 90.43% 90.43% -0.01%
==========================================
Files 62 62
Lines 16438 16458 +20
==========================================
+ Hits 14866 14884 +18
- Misses 1572 1574 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
marco-c
added a commit
to mozilla/rust-code-analysis-output
that referenced
this pull request
Nov 21, 2026
marco-c
marked this pull request as ready for review
November 21, 2026 17:13
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.
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).
marco-c
force-pushed
the
error-root-unit
branch
from
November 21, 2026 17:21
f289e1f to
91d1d38
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1260.
When error recovery makes the root of the tree an
ERRORnode, the root now opens a unit space, instead of the first function space below it becoming the root and absorbing all the others.This changes the DeepSpeech snapshots of
kenlm/lm/model.hhand of the twopywrapfst.ccfiles, whose roots were a namespace spanning a single line and a struct spanning 5 lines: mozilla/rust-code-analysis-output#7, which has to land first (the submodule currently points to its branch).