Skip to content

Commit

Permalink
Enable TrimMultilineRawString
Browse files Browse the repository at this point in the history
  • Loading branch information
BraisGabin committed Aug 22, 2022
1 parent cae4cb8 commit 1add5b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions config/detekt/detekt.yml
Expand Up @@ -237,6 +237,8 @@ style:
excludeGuardClauses: true
SpacingBetweenPackageAndImports:
active: true
TrimMultilineRawString:
active: true
UnderscoresInNumericLiterals:
active: true
UnnecessaryAnnotationUseSiteTarget:
Expand Down
Expand Up @@ -25,7 +25,7 @@ fun BaseRule.compileAndLint(@Language("kotlin") content: String): List<Finding>
}

fun BaseRule.lint(@Language("kotlin") content: String): List<Finding> {
val ktFile = compileContentForTest(content.trimIndent())
val ktFile = compileContentForTest(content)
return findingsAfterVisit(ktFile)
}

Expand All @@ -39,9 +39,9 @@ fun BaseRule.lintWithContext(
@Language("kotlin") content: String,
@Language("kotlin") vararg additionalContents: String,
): List<Finding> {
val ktFile = compileContentForTest(content.trimIndent())
val ktFile = compileContentForTest(content)
val additionalKtFiles = additionalContents.mapIndexed { index, additionalContent ->
compileContentForTest(additionalContent.trimIndent(), "AdditionalTest$index.kt")
compileContentForTest(additionalContent, "AdditionalTest$index.kt")
}
val bindingContext = environment.getContextForPaths(listOf(ktFile) + additionalKtFiles)
val languageVersionSettings = environment.configuration.languageVersionSettings
Expand Down

0 comments on commit 1add5b5

Please sign in to comment.