-
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
Rule 6.2.2(#447) #501
Rule 6.2.2(#447) #501
Conversation
### What's done: * Added rule logic * Added warn tests
### What's done: * Added rule logic * Added warn tests
### What's done: * Added rule logic * Added warn tests
Codecov Report
@@ Coverage Diff @@
## master #501 +/- ##
============================================
+ Coverage 81.70% 81.87% +0.17%
- Complexity 1600 1618 +18
============================================
Files 76 77 +1
Lines 4034 4083 +49
Branches 1282 1290 +8
============================================
+ Hits 3296 3343 +47
Misses 218 218
- Partials 520 522 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
# Conflicts: # diktat-analysis.yml # diktat-rules/src/main/kotlin/generated/WarningNames.kt # diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/constants/Warnings.kt # diktat-rules/src/main/resources/diktat-analysis-huawei.yml # diktat-rules/src/main/resources/diktat-analysis.yml # info/available-rules.md
### What's done: * Fixed bugs
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/constants/Warnings.kt
Outdated
Show resolved
Hide resolved
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/ExtensionFunctionsSameNameRule.kt
Outdated
Show resolved
Hide resolved
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/ExtensionFunctionsSameNameRule.kt
Show resolved
Hide resolved
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/constants/Warnings.kt
Outdated
Show resolved
Hide resolved
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/ExtensionFunctionsSameNameRule.kt
Outdated
Show resolved
Hide resolved
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/ExtensionFunctionsSameNameRule.kt
Outdated
Show resolved
Hide resolved
/** | ||
* This rule checks if extension functions with the same signature don't have related classes | ||
*/ | ||
class ExtensionFunctionsSameNameRule(private val configRules: List<RulesConfig>) : Rule("extension-functions-same-name") { |
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.
What if there are more than two matching classes? It should be a rare case, but at least we shouldn't crash when we encounter it and output something reasonable.
### What's done: * Fixed bugs
# Conflicts: # diktat-analysis.yml # diktat-rules/src/main/kotlin/generated/WarningNames.kt # diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/constants/Warnings.kt # diktat-rules/src/main/resources/diktat-analysis-huawei.yml # diktat-rules/src/main/resources/diktat-analysis.yml # info/available-rules.md
### What's done: * Merged master in current branch
### What's done: * Fixed bugs
There should be no extension functions with the same name and signature if they extend base and inheritor classes
This pull request closes #447
Actions checklist
Fixme
Should find related classes in all project, not only in file