-
-
Notifications
You must be signed in to change notification settings - Fork 783
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
Extend AnnotationExcluder to catch fully qualified annotations #2361
Extend AnnotationExcluder to catch fully qualified annotations #2361
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2361 +/- ##
============================================
+ Coverage 82.81% 82.83% +0.02%
Complexity 2162 2162
============================================
Files 350 350
Lines 6056 6059 +3
Branches 1110 1110
============================================
+ Hits 5015 5019 +4
Misses 469 469
+ Partials 572 571 -1
Continue to review full report at Codecov.
|
Don't really know why |
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.
It's failing because the code snippet doesn't compile. We only compile them in Travis Java8 (performance reasons). You can test it with: ./gradlew :detekt-rules:test -Pcompile-test-snippets=true
I think that for really fix this issue we need type solving but this is better that we have for sure.
...ules/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/UnnecessaryAbstractClassSpec.kt
Outdated
Show resolved
Hide resolved
Thanks for the clarification. Still,
Yeah agree. |
Oh, yes, I didn't noticed that. It's strange, master is passing. Can you rebase your branch with the current |
8eeda07
to
8b1c8f3
Compare
Nope is still failing :/ |
@cortinico I had the same problem in #2350. On jdk8 we additionally compile the provided code snippets in detekt’s unit tests through Jsr223 in order to validate it, because there were problems with invalid Kotlin code in the past. That’s the reason why this PR only fails on this single build agent. I suspect this error is because of one of the following reasons:
|
@cortinico btw thanks for your fast fixes. You helped us out multiple times. Thanks for that! 🙂 |
Currently
AnnotationExcluder
is not handling usages of fully qualified annotations (eg.@dagger.Module
). This is causing the failure reported in #2360.I'm extending it to catch both simple and fully qualified annotations.
Fixes #2360