Skip to content

Implement TrimMultilineRawString#5051

Merged
BraisGabin merged 2 commits into
mainfrom
MultilineRawString
Jul 18, 2022
Merged

Implement TrimMultilineRawString#5051
BraisGabin merged 2 commits into
mainfrom
MultilineRawString

Conversation

@BraisGabin

Copy link
Copy Markdown
Member

This implements one of the proposed rules in #4705

To be more precise it implements this one:

Check that every multiline string uses either trimMargin() or trimIndent() - Kotlin Coding Conventions doc says "To maintain indentation in multiline strings, use trimIndent when the resulting string does not require any internal indentation, or trimMargin when internal indentation is required"

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found 12 potential problems in the proposed changes. Check the Files changed tab for more details.

@BraisGabin BraisGabin force-pushed the MultilineRawString branch from 8dba281 to 46ea790 Compare July 8, 2022 16:47

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found 11 potential problems in the proposed changes. Check the Files changed tab for more details.

…/rules/style/TrimMultilineRawString.kt

Co-authored-by: schalkms <30376729+schalkms@users.noreply.github.com>
@BraisGabin BraisGabin merged commit 88872c0 into main Jul 18, 2022
@BraisGabin BraisGabin deleted the MultilineRawString branch July 18, 2022 12:24
VitalyVPinchuk pushed a commit to VitalyVPinchuk/detekt that referenced this pull request Jul 25, 2022
* Implement TrimMultilineRawString

* Update detekt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/TrimMultilineRawString.kt

Co-authored-by: schalkms <30376729+schalkms@users.noreply.github.com>

Co-authored-by: schalkms <30376729+schalkms@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants