-
Notifications
You must be signed in to change notification settings - Fork 39
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
override functions excluded from FUNCTION_BOOLEAN_PREFIX #567
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, @PhilipDukhov! Your change seems useful. Could you please fix the CI build (https://github.com/cqfn/diKTat/pull/567/checks?check_run_id=1450878080)?
FUNCTION_BOOLEAN_PREFIX.warnAndFix(configRules, emitWarn, isFixMode, functionName.text, functionName.startOffset, functionName) { | ||
// FixMe: add agressive autofix for this | ||
// We don't need to ask subclasses to rename superclass methods | ||
if (node.treeParent.findChildByType(MODIFIER_LIST)?.findChildByType(OVERRIDE_KEYWORD) == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (node.treeParent.findChildByType(MODIFIER_LIST)?.findChildByType(OVERRIDE_KEYWORD) == null) { | |
if (node.treeParent.isOverriden()) { |
We have a special extension function in org.cqfn.diktat.ruleset.utils
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, it's done
on my local machine I wasn't been able to build current version. have an error Redeclaration: AstNodeUtilsTest
when try to run verify
task, that's why it took me so many commits🙃 Any idea why this is happening, for the future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I've never encountered redeclaration errors :) FWIW, sometimes clean build (mvn clean install
) or invalidating caches in IDEA helps.
Codecov Report
@@ Coverage Diff @@
## master #567 +/- ##
=========================================
Coverage 80.81% 80.82%
Complexity 1712 1712
=========================================
Files 87 87
Lines 4383 4385 +2
Branches 1349 1351 +2
=========================================
+ Hits 3542 3544 +2
Misses 298 298
Partials 543 543
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
We don't need to ask subclasses to rename superclass methods