Normalize CANdo Dash Placeholders To YAML Null - #552
Open
coderask wants to merge 1 commit into
Open
Conversation
coderask
force-pushed
the
normalize-null-fields
branch
from
August 29, 2026 17:36
d85eb22 to
a454d03
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.
Summary
Replace
"-"(quoted dash) placeholders with YAML null (~) for boolean fields wherescaled min,scaled max, andmap equationare not applicable.Changes
In
Autogen/CAN/Doc/GRCAN.CANdo, six fields used"-"as a placeholder meaning "not applicable":scaled min,scaled max,map equationscaled min,scaled max,map equationBoth are boolean fields (
data type: b) where scaled range and map equation have no meaning. YAML null (~) is the idiomatic way to express "no value" rather than a quoted dash string.Parser Compatibility
The Perl parsers (
DBCparser.pl) already handle~correctly:parse_eq: the string"~"does not match$HYPHENor any equation pattern, so it falls through to the defaultreturn (1, 0)-- identical behavior to"-"._to_number:"~"does not match/^-?\d/so it returns0-- identical behavior.DBC output was verified identical before and after the change across all three generated files (Primary, Data, Charger).
Convention
Optional fields should use
~(YAML null) when not applicable, and should be filled out whenever the information is known.