-
Notifications
You must be signed in to change notification settings - Fork 506
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
Respect @Suppress("RemoveCurlyBracesFromTemplate") #157
Comments
Can I try to implement this one? |
@AleksandrSl That would be great! I'm not sure how to map compiler warnings to rule ids, though (RemoveCurlyBracesFromTemplate to string-template in this case; note that these two have different scope so in order to support Current workaround is to use P.S. If you feel like helping adding missing https://kotlinlang.org/docs/reference/coding-conventions.html & https://android.github.io/kotlin-guides/style.html rules is of (much) greater value then fixing this particular issue. |
@AleksandrSl I guess that would be OK too (+ easier to implement). NOTE: |
@AleksandrSl you can check out how we suppress issues by annotations @detekt, maybe it helps. |
@shyiko Hi, I've come up with two draft implementations |
Hi @shyiko, did you have time to see proposed implementations, or this issue will be resolved by global changes in the way ktlint works? |
I'd go with AleksandrSl#2 (only it should be it.toSet() instead of setOf() if I'm reading it right). |
Doing some triage, it looks like the PR AleksandrSI#2 has been merged. Can this issue be closed @shyiko @AleksandrSl ? |
PR with support was merged. |
If I have some code like this:
Ktlint reformats it to this:
The reason that I've put on the
@Suppress("RemoveCurlyBracesFromTemplate")
is because I want to have the "fake" indentation to be consistent. As you can see the character count between$TAB
is off by two characters from${TAB}
. I'm going for readability in my test over what is the "most correct".The text was updated successfully, but these errors were encountered: