TextValidator/SdkAnalyzer: name offending label ids and summarise missing labels#79
Open
rousso wants to merge 2 commits into
Open
TextValidator/SdkAnalyzer: name offending label ids and summarise missing labels#79rousso wants to merge 2 commits into
rousso wants to merge 2 commits into
Conversation
The check now names the identifier(s) found in a label's text (e.g. expression|name|906) instead of only stating that one is present, so the missing label can be identified directly.
Missing-label identifiers are carried structurally on ValidationResult and reported at the end of a run in two sections: found missing (referenced by the SDK but absent) and assumed missing (identifier left in label text by the exporter), deduplicated with reference counts. Without --verbose the individual missing-label errors are suppressed in favour of the summary; the error count and exit code are unchanged.
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.
What
Two related changes that make missing-label problems actionable from the analyzer output.
1. Name the offending identifier in the message.
TextValidatornow reports which label identifier it found inside a label's text, e.g.Label in RO contains label identifier(s): expression|name|906.2. End-of-run missing-labels summary. Missing-label identifiers are carried structurally on
ValidationResultand aggregated into a deduplicated report at the end of a run, split into two sections:Referenced label … does not existrules).TextValidator).Each identifier is listed once with its reference count.
3.
--verboseflag. Without it, the thousands of individual missing-label errors are suppressed in favour of the summary, and a hint points to--verbosefor the per-occurrence detail. The error count and exit code are unchanged either way.Notes
tedefo-3301scenarios and the full suite (177) pass;TextValidatorTestextended to assert the named ids and theASSUMEDkind.