-
Notifications
You must be signed in to change notification settings - Fork 436
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
feat(docs): add validation of xrefs to docfx command #6658
Conversation
430f86b
to
7678de5
Compare
foreach ($this->getInvalidXrefs($node->getContent()) as $invalidRef) { | ||
if (isset(self::$allowedReferenceFailures[$node->getFullname()]) | ||
&& self::$allowedReferenceFailures[$node->getFullname()] == $invalidRef) { | ||
// these links are inexplicably broken in phpdoc generation, and will require more investigation |
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.
Let's create a ticket for this one.
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.
It's a tricky situation because the issue (I think) is in phpdoc itself... but there's no indication AFAIK for why this would happen (they look identical to the other xrefs). It's absolutely baffling.
Before I can file an issue with phpdoc
, I need to do more investigation to see if I can find out what could be causing it. Because I truly have no clue.
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.
Filed an issue in #7377
Adds a
validate
method to the docs generation, which throws an error when it encounters broken or invalidxref
references.The check will fail for any improperly formatted references, and if it can't find the class, it will fail for handwritten classes and GAPIC clients, but only output warnings for broken references in protobuf messages. This is because there are too many broken references in protobuf for us to even begin to fix them all. We will want to fix these in the protos themselves eventually (or at least file bugs for the API teams to fix them)
Also updates to the latest
phpdoc
.