-
Notifications
You must be signed in to change notification settings - Fork 506
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix multiline string indentation The indenting margin is determined analog to the trimIndent function. Spaces and tabs are both handled as single indent characters. The indentation of the closing quotes is not relevant unless the opening and closing quotes are on different lines but does not contain any content which is weird but still valid Kotlin code. The 'IndentationRuleTrimIndentTest' is added to clarify and validate the behavior of the trimIndent function. Content of a multiline string should not be indented with respect to the closing quotes (note that the opening quotes can be on a previous line, for example after an assignment). File 'format-raw-string-trim-indent.kt.spec' is changed for following reasons: * Example code was not valid Kotlin code * Changed a comment in an example to explain why the autocorrected code actually looks worse than the original. This will be fixed in a next PR. * Fix code which does not comply to changed indentation rules * Rename file IndentationRuleTrimIndentTest.kt to IndentationRuleTrimIndentTest.kt.txt Avoid breaking the build as long as the ktlint-disable directive on the package statement is not recognized. See pull request #1038 * Fix indentation in unit tests * Remove changing the indentation margin of a multiline raw string literal except for the line with the closing quotes * Change message when closing quotes of multiline raw string literal are incorrectly indented * Remove IndentationRuleTrimIndentTest The indentation margin is no longer been altered by the indent rule. So there is no need anymore to verify the behavior of the trimIndent function. Co-authored-by: Paul Dingemans <pdingemans@bol.com>
- Loading branch information
1 parent
2833711
commit 27f90a4
Showing
12 changed files
with
606 additions
and
287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.