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

Suggest using @property tag in KDoc #332

Merged
merged 14 commits into from
Oct 13, 2020
Merged

Conversation

kentr0w
Copy link
Collaborator

@kentr0w kentr0w commented Sep 28, 2020

Which rule and warnings did you add?

Actions checklist

### What's done:
    Added rule
### What's done:
   Fixed rule
### What's done:
   Made rule, tests
@kentr0w kentr0w added the enhancement New feature or request label Sep 28, 2020
### What's done:
   Fixed all suppress
@codecov
Copy link

codecov bot commented Sep 28, 2020

Codecov Report

Merging #332 into master will decrease coverage by 0.03%.
The diff coverage is 80.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #332      +/-   ##
============================================
- Coverage     83.18%   83.14%   -0.04%     
- Complexity     1295     1331      +36     
============================================
  Files            65       65              
  Lines          3164     3246      +82     
  Branches       1004     1027      +23     
============================================
+ Hits           2632     2699      +67     
- Misses          168      176       +8     
- Partials        364      371       +7     
Flag Coverage Δ Complexity Δ
#unittests 83.14% <80.00%> (-0.04%) 1331.00 <35.00> (+36.00) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
...at-rules/src/main/kotlin/generated/WarningNames.kt 0.00% <ø> (ø) 0.00 <0.00> (ø)
...org/cqfn/diktat/ruleset/rules/kdoc/KdocComments.kt 82.69% <79.01%> (-13.15%) 52.00 <35.00> (+36.00) ⬇️
...tlin/org/cqfn/diktat/ruleset/constants/Warnings.kt 97.11% <100.00%> (+0.02%) 9.00 <0.00> (ø)
.../kotlin/org/cqfn/diktat/ruleset/utils/KDocUtils.kt 25.00% <100.00%> (+18.33%) 0.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 65d36d3...abd0347. Read the comment docs.

### What's done:
   Fixed after review
### What's done:
   Fixed error
/**
* text
*/
@param:JsonProperty("shortName") private val shortName: String
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this case not fixed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this property is private

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but placing documentation in @property tag should be preferable if documentation already exists even for private properties.

### What's done:
    Change rule's logic
### What's done:
    renamed variable
### What's done:
  Fixed bugs after review
…g-KDoc

# Conflicts:
#	diktat-analysis.yml
#	diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/KDocUtils.kt
#	diktat-rules/src/main/resources/diktat-analysis-huawei.yml
#	diktat-rules/src/main/resources/diktat-analysis.yml
Copy link
Member

@petertrr petertrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check why build is failing. Also, one more small fix, everything else is good.

### What's done:
  Changed smoke test
### What's done:
  Changed warn message
### What's done:
  Changed test warn message
Copy link
Member

@petertrr petertrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

…g-KDoc

# Conflicts:
#	diktat-analysis.yml
#	diktat-rules/src/main/kotlin/generated/WarningNames.kt
#	diktat-rules/src/main/resources/diktat-analysis-huawei.yml
#	diktat-rules/src/main/resources/diktat-analysis.yml
@kentr0w kentr0w merged commit 20cb97b into master Oct 13, 2020
@kentr0w kentr0w deleted the feature/property-tag-KDoc branch October 13, 2020 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggest using @property tag in KDoc instead of putting comment before property in constructor
2 participants