-
-
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
Fix TextLocation of Indentation rule #4030
Conversation
Although Indentation applies to the whole file, it's a local rule. Start of the real location reported by ktlint's offset. And I assume that the end location should be on first non-whitespace character.
Codecov Report
@@ Coverage Diff @@
## main #4030 +/- ##
============================================
+ Coverage 83.54% 83.57% +0.02%
- Complexity 3180 3186 +6
============================================
Files 459 459
Lines 9082 9097 +15
Branches 1770 1772 +2
============================================
+ Hits 7588 7603 +15
Misses 561 561
Partials 933 933
Continue to review full report at Codecov.
|
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.
Awesome 1st contribution! Thank you for that.
The code changes look fine to me. In my opinion, a test should be added in order to avoid this issue in the future.
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.
great stuff 🎉
Great idea! I will add test for that |
Although Indentation applies to the whole file, it's a local rule. Start of the real location reported by ktlint's offset. And I assume that the end location should be on first non-whitespace character.
This cause detekt plugin to highlight the whole file and html output to highlight everything to the end of snippet.
Relevant issue: detekt/detekt-intellij-plugin#131