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

Generic upper bound specification warns about [GENERIC_NAME] lint. #493

Closed
Animeshz opened this issue Nov 4, 2020 · 3 comments · Fixed by #536
Closed

Generic upper bound specification warns about [GENERIC_NAME] lint. #493

Animeshz opened this issue Nov 4, 2020 · 3 comments · Fixed by #536
Assignees
Labels
bug Something isn't working

Comments

@Animeshz
Copy link
Contributor

Animeshz commented Nov 4, 2020

Steps to Reproduce

  1. Paste the following code:
interface Test<T : Collection<T>>
  1. Run the diktat with default configurations.

Expected behavior

There shouldn't be any warnings.

Observed behavior

The following warning is encountered:

[GENERIC_NAME] generic name should contain only one single capital letter, it can be followed by a number: <T : Collection<T>>

Environment information

  • diktat version: 0.1.2
  • build tool (maven/gradle): gradle
  • how is diktat run (CLI, plugin, etc.): gradle task
  • kotlin version: 1.4.10
  • operating system: Windows 10 Build 1909
@Animeshz Animeshz added the bug Something isn't working label Nov 4, 2020
@orchestr7
Copy link
Member

@Animeshz thanks for your report. That is definitely a bug, we will fix it this week

@orchestr7
Copy link
Member

Tests:

  interface Test1<T: String>
  interface Test2<T : Collection<T>>
  interface Test3<out T>
  interface Test3<in T>

@petertrr
Copy link
Member

@Animeshz this bug is fixed in diktat 0.1.5. Also, the new diktat-gradle-plugin is out, you can try it out too!

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

Successfully merging a pull request may close this issue.

4 participants