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

A generic type parameter in Kdoc should not be reported #1929

Open
polarene opened this issue Apr 8, 2024 · 0 comments
Open

A generic type parameter in Kdoc should not be reported #1929

polarene opened this issue Apr 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@polarene
Copy link

polarene commented Apr 8, 2024

Describe the bug

When documenting a type parameter in Kdoc, the only correct way to do it is using the @param tag, for example:

/**
 * @param T the target type to return
 */
fun <T> genericFunc(): T

Unfortunately Diktat reports:

[KDOC_WITHOUT_PARAM_TAG] all methods which take arguments should have @param tags in KDoc: T param isn't present in argument list

Which I believe is a wrong behavior, given that it's taking into consideration the formal parameters only.

Expected behavior

Diktat should not report a violation for the above example.

Observed behavior

Diktat reports a KDOC_WITHOUT_PARAM_TAG

Environment information

  • diktat version: 2.0.0
  • build tool (maven/gradle): gradle
  • how is diktat run (CLI, plugin, etc.): plugin
  • kotlin version: 1.9.23
  • operating system: MacOS 14.3.1
@polarene polarene added the bug Something isn't working label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant