Enable AlsoCouldBeApply
rule
This commit is contained in:
parent
6393a4ece7
commit
b970e2f90f
4 changed files with 7 additions and 7 deletions
|
@ -6,5 +6,5 @@ import java.util.UUID
|
|||
@Suppress("NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS")
|
||||
fun createRandomTempDirectory(): File {
|
||||
val tempDirectory = File(System.getProperty("java.io.tmpdir", "."))
|
||||
return File(tempDirectory, UUID.randomUUID().toString()).also { it.mkdir() }
|
||||
return File(tempDirectory, UUID.randomUUID().toString()).apply { mkdir() }
|
||||
}
|
||||
|
|
|
@ -506,7 +506,7 @@ potential-bugs:
|
|||
style:
|
||||
active: true
|
||||
AlsoCouldBeApply:
|
||||
active: false
|
||||
active: true
|
||||
BracesOnIfStatements:
|
||||
active: false
|
||||
singleLine: 'never'
|
||||
|
|
|
@ -85,8 +85,8 @@ class AuthorizationRepositoryTest {
|
|||
val testSubject = AuthorizationRepository(
|
||||
service = service,
|
||||
)
|
||||
val intent = Intent().also {
|
||||
it.putExtra(AuthorizationResponse.EXTRA_RESPONSE, authorizationResponse.jsonSerializeString())
|
||||
val intent = Intent().apply {
|
||||
putExtra(AuthorizationResponse.EXTRA_RESPONSE, authorizationResponse.jsonSerializeString())
|
||||
}
|
||||
|
||||
// When
|
||||
|
@ -137,8 +137,8 @@ class AuthorizationRepositoryTest {
|
|||
Uri.parse("https://example.com/errorUri"),
|
||||
null,
|
||||
)
|
||||
val intent = Intent().also {
|
||||
it.putExtra(AuthorizationException.EXTRA_EXCEPTION, authorizationException.toJsonString())
|
||||
val intent = Intent().apply {
|
||||
putExtra(AuthorizationException.EXTRA_EXCEPTION, authorizationException.toJsonString())
|
||||
}
|
||||
|
||||
// When
|
||||
|
|
|
@ -395,7 +395,7 @@ class Pop3ConnectionTest {
|
|||
}
|
||||
|
||||
private fun startServer(block: MockPop3Server.() -> Unit): MockPop3Server {
|
||||
return MockPop3Server().apply(block).also { it.start() }
|
||||
return MockPop3Server().apply(block).apply { start() }
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
|
Loading…
Reference in a new issue