Closed wlupton closed 2 years ago
Wow, you are really careful!
@fredgan, someone complained! We pass all BBF YANG through the edit
transform to add metadata and reformat it, and people noticed that some of the presence
statements were unnecessarily wrapped.
Hmm. There doesn't seem to be a reference to PR #776. Now there is.
I believe that the YANG
_emit_stmt()
logic is wrong for multi-line arguments. The YANG shown below has twopresence
statements, both of which are 66 characters long but the first has a multi-line argument.With this command (using the latest pyang from GitHub master):
the first one is (wrongly) wrapped to the next line, but the second one (correctly) isn't:
There appears to be an "off by three" error, because it's necessary to set
--yang-line-length=69
to prevent the first one from wrapping:I think that I see what the problem is (actually I think there are two separate problems) and will create a PR.
YANG