Skip to content

Commit 5767820

Browse files
committed
Fixing detekt
1 parent f1def71 commit 5767820

File tree

1 file changed

+5
-3
lines changed
  • plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqFeatureDev/session

1 file changed

+5
-3
lines changed

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqFeatureDev/session/Session.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package software.aws.toolkits.jetbrains.services.amazonqFeatureDev.session
66
import com.intellij.openapi.diagnostic.logger
77
import com.intellij.openapi.project.Project
88
import com.intellij.openapi.vfs.VfsUtil
9-
import kotlinx.coroutines.yield
109
import software.aws.toolkits.jetbrains.common.util.resolveAndCreateOrUpdateFile
1110
import software.aws.toolkits.jetbrains.common.util.resolveAndDeleteFile
1211
import software.aws.toolkits.jetbrains.services.amazonq.FeatureDevSessionContext
@@ -181,24 +180,27 @@ class Session(val tabID: String, val project: Project) {
181180
VfsUtil.markDirtyAndRefresh(true, true, true, context.selectedSourceFolder)
182181
}
183182

183+
// Suppressing because insertNewFiles needs to be a suspend function in order to be tested
184+
@Suppress("RedundantSuspendModifier")
184185
suspend fun insertNewFiles(
185186
filePaths: List<NewFileZipInfo>,
186187
) {
187188
val selectedSourceFolder = context.selectedSourceFolder.toNioPath()
188189

189190
filePaths.forEach {
190-
yield()
191191
resolveAndCreateOrUpdateFile(selectedSourceFolder, it.zipFilePath, it.fileContent)
192192
it.changeApplied = true
193193
}
194194
}
195+
196+
// Suppressing because insertNewFiles needs to be a suspend function in order to be tested
197+
@Suppress("RedundantSuspendModifier")
195198
suspend fun applyDeleteFiles(
196199
deletedFiles: List<DeletedFileInfo>,
197200
) {
198201
val selectedSourceFolder = context.selectedSourceFolder.toNioPath()
199202

200203
deletedFiles.forEach {
201-
yield()
202204
resolveAndDeleteFile(selectedSourceFolder, it.zipFilePath)
203205
it.changeApplied = true
204206
}

0 commit comments

Comments
 (0)