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
Remove getLineAndColumnInPsiFile function #7261
Conversation
Blocked, see #7260 (comment) |
3ce73b3
to
7781d65
Compare
...yle/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/MultilineRawStringIndentation.kt
Fixed
Show fixed
Hide fixed
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7261 +/- ##
============================================
+ Coverage 84.75% 84.77% +0.01%
+ Complexity 3992 3990 -2
============================================
Files 578 578
Lines 12027 12023 -4
Branches 2485 2478 -7
============================================
- Hits 10193 10192 -1
Misses 606 606
+ Partials 1228 1225 -3 ☔ View full report in Codecov by Sentry. |
This was introduced to work around issues with mutated PSI. This is no longer an issue since detekt#7206. Because the formatting rule set operates on a copy of the PsiFile and not the original PsiFile the original PsiFile will never be modified, so the protection offered by this function is not needed.
…ions There is no longer any reason to forbid usage of this function.
6ad6ae7
to
766759d
Compare
This was introduced to work around issues with mutated PSI. This is no longer an issue since #7206. Because the formatting rule set operates on a copy of the PsiFile and not the original PsiFile the original PsiFile will never be modified, so the protection offered by this function is not needed.
This also masks some issues with rule implementations due to use of
runCatching
- MaxLineLength was previously raisingIndexOutOfBoundException
whenDiagnosticUtils.getLineAndColumnInPsiFile
was called, but it was caught byrunCatching
and the exception was hidden. Avoiding that behaviour will avoid masking those issues in future.