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

Hotfix for Data Classes rule #1445

Merged
merged 2 commits into from
Jul 13, 2022
Merged

Hotfix for Data Classes rule #1445

merged 2 commits into from
Jul 13, 2022

Conversation

orchestr7
Copy link
Member

What's done:

  • covered cases when data class does not have a body: class (val a: Int)
    Previously we handled only class (val a: Int) {} because of the invalid logic for hasAppropriateClassBody

### What's done:
- covered cases when data class does not have a body: class (val a: Int)
Previously we handled only class (val a: Int) {} because of the invalid logic for `hasAppropriateClassBody`
@orchestr7 orchestr7 linked an issue Jul 12, 2022 that may be closed by this pull request
@orchestr7 orchestr7 added this to the 1.2.2 milestone Jul 12, 2022
@codecov
Copy link

codecov bot commented Jul 12, 2022

Codecov Report

Merging #1445 (4fc9c83) into master (98ea490) will increase coverage by 0.02%.
The diff coverage is 33.33%.

@@             Coverage Diff              @@
##             master    #1445      +/-   ##
============================================
+ Coverage     83.21%   83.23%   +0.02%     
- Complexity     2558     2560       +2     
============================================
  Files           107      107              
  Lines          7618     7618              
  Branches       2103     2103              
============================================
+ Hits           6339     6341       +2     
  Misses          388      388              
+ Partials        891      889       -2     
Flag Coverage Δ
unittests 83.23% <33.33%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
...qfn/diktat/ruleset/rules/chapter4/SmartCastRule.kt 50.71% <0.00%> (ø)
.../ruleset/rules/chapter6/classes/DataClassesRule.kt 82.08% <100.00%> (+2.98%) ⬆️

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 98ea490...4fc9c83. Read the comment docs.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 12, 2022

JUnit Tests (macOS, EnricoMi/publish-unit-test-result-action@v1)

1 287 tests   1 272 ✔️  1m 31s ⏱️
   159 suites       15 💤
   159 files           0

Results for commit 4fc9c83.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 12, 2022

JUnit Tests (Windows, EnricoMi/publish-unit-test-result-action@v1)

1 287 tests   1 272 ✔️  54s ⏱️
   159 suites       15 💤
   159 files           0

Results for commit 4fc9c83.

♻️ This comment has been updated with latest results.

@orchestr7 orchestr7 merged commit ad8718b into master Jul 13, 2022
@orchestr7 orchestr7 deleted the feature/data-class-body branch July 13, 2022 08:52
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.

USE_DATA_CLASS rule is not triggered on classes without a body
2 participants