-
-
Notifications
You must be signed in to change notification settings - Fork 771
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
Fix hyperlink for elements of the type 'KtFile' #3386
Fix hyperlink for elements of the type 'KtFile' #3386
Conversation
337c48b
to
a67ba86
Compare
Codecov Report
@@ Coverage Diff @@
## master #3386 +/- ##
============================================
+ Coverage 80.45% 80.46% +0.01%
- Complexity 2737 2739 +2
============================================
Files 447 448 +1
Lines 8287 8282 -5
Branches 1573 1573
============================================
- Hits 6667 6664 -3
+ Misses 772 771 -1
+ Partials 848 847 -1
Continue to review full report at Codecov.
|
e31e758
to
88c7eac
Compare
88c7eac
to
9b5bd96
Compare
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 detailed investigation! This PR looks very good! Finally, this issue gets closed. I like it.
detekt-api/src/test/kotlin/io/gitlab/arturbosch/detekt/api/EntitySpec.kt
Outdated
Show resolved
Hide resolved
detekt-api/src/main/kotlin/io/gitlab/arturbosch/detekt/api/internal/Signatures.kt
Show resolved
Hide resolved
…itySpec.kt Co-authored-by: M Schalk <30376729+schalkms@users.noreply.github.com>
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! Really good investigation!
Issue: #2340
Description:
IntelliJ (and consequently Android Studio), considers the following implementation when enabling hyperlink in its terminal emulator: AbstractFileHyperlinkFilter
I noticed that there were two issues happening related to hyperlinks not being enabled in the output of detect:
Example of the point 2 before the changes I applied in this PR:
Fix:
A fix for point 2 is to simplify the Entity name in the case of Files by getting the file name without the absolute path since the path is also written along with the output.
Regarding other terminal emulators, it really depends on the terminal emulator you're using to specify the way of hyperlinking: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda.
This only tackles the IntelliJ Terminal Emulator.