-
-
Notifications
You must be signed in to change notification settings - Fork 651
Fix Issue 14622 - documented unit test following undocumented symbol #14527
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
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request and interest in making D better, @ntrel! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#14527" |
compiler/src/dmd/parse.d
Outdated
if (pAttrs.comment && *pLastDecl && !pLastDecl.comment) | ||
{ | ||
error("Documented unittest found following undocumented symbol `%s`", | ||
pLastDecl.toPrettyChars()); | ||
errorSupplemental(pLastDecl.loc, "`%s` declared here", pLastDecl.toChars()); | ||
} |
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 not error out on documentation unless we are generating documentation.
Looking at this from another PoV, why aren't public symbol put in the documentation regardless of their |
There's no way to get the matching doc symbol from the previous unittest.
Move check to doc.d. Also remove unnecessary compile check that is already in `compilable`.
@Geod24 For general symbols: sometimes you might write documentation for a symbol and then decide it's not ready, so you remove the doc comment. For nested doc comments inside that symbol it would be awkward to go through and undocument them, then when it's ready go through it again and remember to re-document all of them properly. So it can be useful that such nested ddoc comments are ignored. Documented unit tests are different because they are easier to accidentally break, I explained why in a comment in 89f79e7. |
return cast(Thread) cast(void*) t; | ||
} | ||
|
||
private extern(D) static void thread_yield() @nogc nothrow |
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.
This is private and not used anywhere in this module. Presumably I should remove it?
The buildkite
|
* Fix missing staticArray unittest in docs Found using dlang/dmd#14527. * Fix missing FloatRep and DoubleRep unittests in docs * 2 JSONValue op overloads * std.random * detabber * remove * std.digest.murmurhash
which is valid. |
Add diagnostic.