-
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 5.2.3 Use default values for function arguments instead of overloading them #370
Conversation
### What's done: Implemented rule
Codecov Report
@@ Coverage Diff @@
## master #370 +/- ##
============================================
+ Coverage 83.09% 83.18% +0.09%
- Complexity 1289 1295 +6
============================================
Files 64 65 +1
Lines 3147 3164 +17
Branches 999 1004 +5
============================================
+ Hits 2615 2632 +17
Misses 168 168
Partials 364 364
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/OverloadingArgumentsFunction.kt
Outdated
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/OverloadingArgumentsFunction.kt
Outdated
Show resolved
Hide resolved
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/OverloadingArgumentsFunction.kt
Outdated
Show resolved
Hide resolved
...les/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/OverloadingArgumentsFunctionWarnTest.kt
Show resolved
Hide resolved
### What's done: Fixed bugs after review
…-function-default-values # 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
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/OverloadingArgumentsFunction.kt
Outdated
Show resolved
Hide resolved
### What's done: Fixed bug after review
…-function-default-values # Conflicts: # diktat-rules/src/main/kotlin/generated/WarningNames.kt # diktat-rules/src/main/resources/diktat-analysis-huawei.yml
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.
I just noticed that isComparisonWithAbs
in AccurateCalculationsRule
is detected by your rule, though there are extensions on different class with same name. You should also compare receiver type if it is present along with function names.
### What's done: Fixed final bug
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/OverloadingArgumentsFunction.kt
Outdated
Show resolved
Hide resolved
### What's done: Fixed bug after review
…-function-default-values # 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 bug after review
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
What's done:
Actions checklist