Skip to content
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

Implement TrimMultilineRawString #5051

Merged
merged 2 commits into from Jul 18, 2022
Merged

Implement TrimMultilineRawString #5051

merged 2 commits into from Jul 18, 2022

Conversation

BraisGabin
Copy link
Collaborator

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"

Copy link

@github-code-scanning github-code-scanning bot left a comment

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.

Copy link

@github-code-scanning github-code-scanning bot left a comment

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
19 checks passed
@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.

None yet

2 participants