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

Bugfix. ClassCastException in IndentationRule when blank line is added after @implNote tag in KDoc #527

Merged
merged 11 commits into from
Nov 23, 2020

Conversation

aktsay6
Copy link
Collaborator

@aktsay6 aktsay6 commented Nov 16, 2020

What's done:

  • Fixed bugs

ClassCastException triggers in IndentationRule when blank line is added after @implNote tag in KDoc

This pull request closes #480

### What's done:
  * Fixed bugs
@aktsay6 aktsay6 added the bug Something isn't working label Nov 16, 2020
@aktsay6 aktsay6 requested review from petertrr and kentr0w November 16, 2020 10:45
@codecov
Copy link

codecov bot commented Nov 16, 2020

Codecov Report

Merging #527 (e5c375b) into master (052bd9d) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #527      +/-   ##
============================================
- Coverage     81.68%   81.68%   -0.01%     
- Complexity     1641     1652      +11     
============================================
  Files            79       83       +4     
  Lines          4139     4204      +65     
  Branches       1307     1312       +5     
============================================
+ Hits           3381     3434      +53     
- Misses          229      238       +9     
- Partials        529      532       +3     
Flag Coverage Δ Complexity Δ
unittests 81.68% <100.00%> (-0.01%) 0.00 <0.00> (ø)

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

Impacted Files Coverage Δ Complexity Δ
...g/cqfn/diktat/ruleset/rules/kdoc/KdocFormatting.kt 77.12% <100.00%> (-0.15%) 73.00 <0.00> (ø)
...main/kotlin/org/cqfn/diktat/plugin/gradle/Utils.kt 62.50% <0.00%> (ø) 0.00% <0.00%> (?%)
...n/org/cqfn/diktat/plugin/gradle/DiktatExtension.kt 100.00% <0.00%> (ø) 4.00% <0.00%> (?%)
...qfn/diktat/plugin/gradle/DiktatJavaExecTaskBase.kt 79.31% <0.00%> (ø) 5.00% <0.00%> (?%)
...rg/cqfn/diktat/plugin/gradle/DiktatGradlePlugin.kt 100.00% <0.00%> (ø) 2.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 4d17fe0...e5c375b. Read the comment docs.

### What's done:
  * Fixed bugs
### What's done:
  * test diktat snapshot (action)
### What's done:
  * test diktat snapshot (action)
### What's done:
  * test diktat snapshot (action)
### What's done:
  * test diktat snapshot (action)
### What's done:
  * Fixed bugs
@aktsay6 aktsay6 marked this pull request as ready for review November 16, 2020 14:01
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.

This is a fix for a redundant blank line. What about ClassCastException triggers in IndentationRule as stated in the issue? You should reproduce it in smoke test.

### What's done:
  * Fixed bugs
# Conflicts:
#	diktat-rules/src/test/resources/test/smoke/src/main/kotlin/Example3Expected.kt
#	diktat-rules/src/test/resources/test/smoke/src/main/kotlin/Example3Test.kt
@aktsay6 aktsay6 requested a review from petertrr November 20, 2020 12:59
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.

See KdocFormattingFixTest - special tags should have newline after them. This test fails if run against the whole ruleset with the same exception. Does your fix cover it?

### What's done:
  * Fixed bugs
@aktsay6 aktsay6 requested a review from petertrr November 20, 2020 16:05
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

@aktsay6 aktsay6 merged commit 3888e94 into master Nov 23, 2020
@aktsay6 aktsay6 deleted the bugfix/class-cast-exception-kdoc(#480) branch November 23, 2020 12:23
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 this pull request may close these issues.

ClassCastException in IndentationRule when blank line is added after @implNote tag in KDoc
2 participants