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

Fix: CLASS_SHOULD_NOT_BE_ABSTRACT breaks code when abstract class implements an interface #1200

Merged
merged 3 commits into from
Jan 31, 2022

Conversation

kgevorkyan
Copy link
Member

@kgevorkyan kgevorkyan commented Jan 31, 2022

What's done:

  • Class can have abstract modifier if it implements interface, don't trigger on such cases

### What's done:
* WIP
@codecov
Copy link

codecov bot commented Jan 31, 2022

Codecov Report

Merging #1200 (5962f07) into master (854cb18) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1200      +/-   ##
============================================
- Coverage     84.21%   84.20%   -0.02%     
  Complexity     2514     2514              
============================================
  Files           103      103              
  Lines          7070     7070              
  Branches       1910     1911       +1     
============================================
- Hits           5954     5953       -1     
  Misses          333      333              
- Partials        783      784       +1     
Flag Coverage Δ
unittests 84.20% <0.00%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
...eset/rules/chapter6/classes/AbstractClassesRule.kt 88.00% <0.00%> (-4.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 854cb18...5962f07. Read the comment docs.

@kgevorkyan kgevorkyan marked this pull request as ready for review January 31, 2022 12:47
@@ -35,6 +36,7 @@ class AbstractClassesRule(configRules: List<RulesConfig>) : DiktatRule(

// If an abstract class extends another class, than that base class can be abstract too.
// Then this class must have `abstract` modifier even if it doesn't have any abstract members.
// Class also must have `abstract` modifier if it implements interface
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// Class also must have `abstract` modifier if it implements interface
// Class also can have `abstract` modifier if it implements interface

### What's done:
* Review
@kgevorkyan kgevorkyan enabled auto-merge (squash) January 31, 2022 13:13
@kgevorkyan kgevorkyan merged commit 749587a into master Jan 31, 2022
@kgevorkyan kgevorkyan deleted the bugfix/fix_for_abstract_class branch January 31, 2022 13:26
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.

CLASS_SHOULD_NOT_BE_ABSTRACT breaks code when abstract class implements an interface
2 participants