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

Fixed KdocComments for types in generic classes #1832

Merged
merged 4 commits into from
Nov 29, 2023

Conversation

DrAlexD
Copy link
Member

@DrAlexD DrAlexD commented Nov 29, 2023

What's done:

  • fixed case when KDOC_EXTRA_PROPERTY warning generation didn't take into account types in generic classes.
  • added configuration isParamTagsForGenericTypes for @param tags creation for types in generic classes.
  • added fixed warnings KDOC_NO_CONSTRUCTOR_PROPERTY for cases when configuration option are on, and then generic types must have @param tags in class-KDoc. Additionally added logic for replacing incorrect tag with correct one regardless of whether configuration is enabled or not.
  • added new warning and fix tests.

Closes #1825

### What's done:
- fixed case when `KDOC_EXTRA_PROPERTY` warning generation didn't take into account types in generic classes.
- added configuration `isParamTagsForGenericTypes` for `@param` tags creation for types in generic classes.
- added fixed warnings `KDOC_NO_CONSTRUCTOR_PROPERTY` for cases when configuration option are on, and then generic types must have `@param` tags in class-KDoc. Additionally added logic for replacing incorrect tag with correct one regardless of whether configuration is enabled or not.
- added new warning and fix tests.

Closes saveourtool#1825
Copy link

codecov bot commented Nov 29, 2023

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (626bac9) 78.15% compared to head (a72f496) 78.18%.

Files Patch % Lines
...diktat/ruleset/rules/chapter2/kdoc/KdocComments.kt 68.08% 0 Missing and 15 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1832      +/-   ##
============================================
+ Coverage     78.15%   78.18%   +0.02%     
+ Complexity     2432     2425       -7     
============================================
  Files           131      131              
  Lines          8616     8631      +15     
  Branches       2174     2174              
============================================
+ Hits           6734     6748      +14     
- Misses          916      917       +1     
  Partials        966      966              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DrAlexD DrAlexD added this to the 2.1.0 milestone Nov 29, 2023
@DrAlexD DrAlexD self-assigned this Nov 29, 2023
@DrAlexD DrAlexD added bug Something isn't working enhancement New feature or request labels Nov 29, 2023
@DrAlexD DrAlexD merged commit 3ebe006 into saveourtool:master Nov 29, 2023
14 of 15 checks passed
@DrAlexD DrAlexD deleted the bugfix/kdoc_extra_property branch November 29, 2023 14:11
@nulls nulls modified the milestones: 2.1.0, 2.0.0 Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False KDOC_EXTRA_PROPERTY for type in generic classes
3 participants