Skip to content
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

Javadoc @inheritDoc tag is not handled in HTML output #159

Closed
eskatos opened this issue May 17, 2017 · 7 comments · Fixed by #1608
Closed

Javadoc @inheritDoc tag is not handled in HTML output #159

eskatos opened this issue May 17, 2017 · 7 comments · Fixed by #1608
Assignees
Labels
enhancement An issue for a feature or an overall improvement

Comments

@eskatos
Copy link
Contributor

eskatos commented May 17, 2017

When dokka processes a Java type using the @inheritDoc tag in its Javadoc, it is rendered as is in the Dokka HTML output.

I would be expected that it is replaced by inherited documentation or at least link to it.

For an example, see the list of Inherited Functions here

@JWT007
Copy link

JWT007 commented Oct 12, 2017

I would also like to see support for the @inheritdoc annotation.

I think I saw a post from @yole on another forum saying that /** {@inheritDoc} */ is superfluous and blows up the code; however, while I get where he is coming from I still would love to see it for the following reasons:

  • I harp on my collegues all the time about Javadoc'ing their code - not supporting this results in mish-mash of documented and undocumented methods in a kotlin file
  • The presence of the /** {@inheritDoc} */ at least lets me know that the code author put some thought into documenting the method and decided that the parent documentation was sufficient.
  • Javadoc lets you use the /** {@inheritDoc} */ to extend the original documentation with more specific information by for example adding more specific details about the implementation without rewriting all of the parent javadoc.

Wouldn't it be possible to both keep the default behavior of inheriting documentation if none is present and supporting the annotation?

@pdvrieze
Copy link

While mere /** {@inheritDoc} */ is probably poor code style, it is actually very helpful to partially override inherited javadoc. Either by extending (prepending/appending) the documentation of a specific element (parameter, exception....) or by selectively replacing parts.

@dsebastien
Copy link

I agree with @pdvrieze, I use {@inheritdoc} a lot exactly for that purpose. It allows to provide additional details, which is particularly interesting when you have different implementations of the same base type.

@CLOVIS-AI
Copy link
Contributor

I know I'm a bit late, but I'm interested by this too and since this issue has never been closed, I'd like to have it discussed again.

@basshelal
Copy link

Little late as well, but I too would also like this for the very same reason @pdvrieze said.
Copying and pasting documentation from the parent is just more documentation to maintain and linking back to the parent's documentation is a little inconvenient.

@hXtreme
Copy link

hXtreme commented Mar 25, 2020

Is this feature even being considered?

It seems very helpful in extending base class/interface documentation as others have already pointed out.

@kamildoleglo
Copy link
Contributor

It should be fairly easy to do as a plugin when the 0.11.0 is released

@kamildoleglo kamildoleglo added the enhancement An issue for a feature or an overall improvement label May 13, 2020
@Kordyjan Kordyjan added this to the Stable milestone Aug 31, 2020
@MarcinAman MarcinAman self-assigned this Nov 2, 2020
@MarcinAman MarcinAman linked a pull request Nov 9, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An issue for a feature or an overall improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants