You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a follow-up issue for #1803 as I believe @schalkms' statement of "Since detekt provides a wrapper over ktlint, this is not directly a problem of detekt" is not correct, and the issue seems to be in detekt, not in ktlint, as detekt does not properly inject EDITOR_CONFIG_USER_DATA_KEY before calling ktlint.
Expected Behavior
Enabling ktlint's FinalNewline rule should not crash detekt.
Observed Behavior
Enabling ktlint's FinalNewline rule does crash detekt.
Thanks for bringing up this issue again and describing the bug in detail with sample code, so that we can reproduce it!
Yes, my statement in the linked issue is wrong. Based on the issue report it wasn't possible to reproduce it.
This is a follow-up issue for #1803 as I believe @schalkms' statement of "Since detekt provides a wrapper over ktlint, this is not directly a problem of detekt" is not correct, and the issue seems to be in detekt, not in ktlint, as detekt does not properly inject
EDITOR_CONFIG_USER_DATA_KEY
before calling ktlint.Expected Behavior
Enabling ktlint's
FinalNewline
rule should not crash detekt.Observed Behavior
Enabling ktlint's
FinalNewline
rule does crash detekt.Steps to Reproduce
Use
on a file with missing final new line.
Context
ktlint expects the
EDITOR_CONFIG_USER_DATA_KEY
to be present, and detekt actually has code to add it, but that code does not seem to be called as FinalNewline does not overrideeditorConfigUpdater
to return something different thannull
.Your Environment
The text was updated successfully, but these errors were encountered: