-
Notifications
You must be signed in to change notification settings - Fork 597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change doc template to no print null missing values. #6565
Conversation
* Now docs won't include null, "", or [] in the default value list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks much cleaner, thanks. Merge when tests pass.
@cmnbroad I added another change too it, probably more little stuff we can do. |
It reports the argument ranges kind of weirdly, floats fault to -infinity -> infinity but so do ints and probably longs. |
@@ -65,7 +65,7 @@ | |||
<#macro argumentDetails arg> | |||
<hr style="border-bottom: dotted 1px #C0C0C0;" /> | |||
<h3><a name="${arg.name}">${arg.name} </a> | |||
<#if arg.synonyms??> / <small>${arg.synonyms}</small></#if> | |||
<#if arg.synonyms != "NA"> / <small>${arg.synonyms}</small></#if> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, this might not be safe without the "??" guard, which checks to see if the variable exists. If it doesn't (i.e, maybe positional args IIRC), this will throw.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooh, ok, I'll add that check back as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now thx.
@cmnbroad We do have a bit of an awkward situation now with any argument that has "-NA" as a short name.. |
True. Perhaps when we do the port to the new doclet api we should change the java code to always use null for missing data, and let the template decide how to present it. The we don't have to rely on string literal sentinels like this. |
* Now docs won't include null, "", or [] in the default value list. * If an argument has no short name it will no longer print NA in the short name options.
This is one of the changes I mentioned on the call.