D-Scanner
D-Scanner copied to clipboard
std/int128.d(19:15)[warn]: Public declaration 'Int128' has no documented example
I tried a documented example:
- embedded in the documentation for the struct
- as a member of the struct
- following the closing brace of the struct
I have no idea what dscanner wants.
Example:
https://github.com/dlang/phobos/pull/8426
File that does the analysis: https://github.com/dlang-community/D-Scanner/blob/2963358eb4a24064b0893493684d4075361297eb/src/dscanner/analysis/has_public_example.d
The problem is probably the version block being before the unittest (I'm guessing).
the D-Scanner check seems to be correct. There is no public example for the Int128 struct in the generated ddoc page using dmd -D

Moving the documented unittest right after the closing brace of the struct makes it appear in the documentation and also makes D-Scanner not emit any error.
I suggest that the documentation for Dscanner have, for everything checked, an example of what passing it looks like. I also recommend that the Dscanner executable be included with the dmd distribution.