-
-
Notifications
You must be signed in to change notification settings - Fork 777
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
Add naming test for ForbiddenVoid rule #1740
Conversation
This adds tests to reproduce issue #1642
it("does not report when functions or classes are called 'Void'") { | ||
val code = """ | ||
class Void { | ||
fun void() {} |
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.
this should be fairly easy to fix, we just check if this name is a child of a declaration?
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 do you want to fix? There's nothing to fix here.
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.
Ah though this is a false positive but now seeing that the declaration name does not trigger it aka the isEmpty check :)
Codecov Report
@@ Coverage Diff @@
## master #1740 +/- ##
============================================
+ Coverage 79.78% 79.82% +0.04%
- Complexity 1933 1934 +1
============================================
Files 324 324
Lines 5456 5467 +11
Branches 1004 1006 +2
============================================
+ Hits 4353 4364 +11
Misses 581 581
Partials 522 522
Continue to review full report at Codecov.
|
I don't know what problem CodeFactor has. There's no trailing whitespace there. |
Not even in the testing code? It look wierd at github though. |
This adds tests to reproduce issue #1642