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

New Rule COMMENTS_BY_KDOC was implemented #1350

Merged
merged 14 commits into from
Jun 14, 2022

Conversation

icemachined
Copy link
Member

@icemachined icemachined commented Jun 7, 2022

What's done:

Which rule and warnings did you add?

This pull request closes

Actions checklist

  • Implemented Rule, added Warnings
  • Added tests on checks
  • Added tests on fixers
  • Updated diktat-analysis.yml
  • Updated available-rules.md

Fixme

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Found 96 potential problems in the proposed changes. Check the Files changed tab for more details.

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Found 96 potential problems in the proposed changes. Check the Files changed tab for more details.

@codecov
Copy link

codecov bot commented Jun 7, 2022

Codecov Report

Merging #1350 (83a81c7) into master (65335c7) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master    #1350      +/-   ##
============================================
+ Coverage     83.56%   83.59%   +0.02%     
- Complexity     2564     2567       +3     
============================================
  Files           106      106              
  Lines          7278     7291      +13     
  Branches       2017     2018       +1     
============================================
+ Hits           6082     6095      +13     
  Misses          353      353              
  Partials        843      843              
Flag Coverage Δ
unittests 83.59% <100.00%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
...t/rules/chapter6/ExtensionFunctionsSameNameRule.kt 96.82% <ø> (ø)
...tlin/org/cqfn/diktat/ruleset/utils/AstNodeUtils.kt 82.74% <ø> (ø)
...tlin/org/cqfn/diktat/ruleset/constants/Warnings.kt 98.08% <100.00%> (+0.01%) ⬆️
...diktat/ruleset/rules/chapter2/kdoc/KdocComments.kt 89.00% <100.00%> (+0.73%) ⬆️

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 65335c7...83a81c7. Read the comment docs.

### What's done:

* New Rule COMMENTS_BY_KDOC was added to check if code block contains kdoc comments
* and fix it by converting to block comment
* tests and docs were added
* Closes: #828
@icemachined icemachined force-pushed the feature/kdoc-to-block-comments branch from 524acba to 34efd45 Compare June 7, 2022 15:53
|/**
| * right place for kdoc
| */
|class Example {
Copy link
Member

Choose a reason for hiding this comment

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

could you please also check top-level methods (in Kotlin you can do it without a class and from AST perspective they can differ)?

fun foo() {
    /**
    */
}

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@orchestr7
Copy link
Member

lgtm

@icemachined icemachined enabled auto-merge (squash) June 14, 2022 08:27
@icemachined icemachined merged commit 48f0c3d into master Jun 14, 2022
@icemachined icemachined deleted the feature/kdoc-to-block-comments branch June 14, 2022 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rule: Change kdoc comments, which are in inappropriate places to the block comments
2 participants