Skip to content

Commit 90c5413

Browse files
committed
fix(compiler): skip ignored and .idea/ files in local search
Added checks to skip files under ignored directories and .idea/ folder during local search to avoid unnecessary processing.
1 parent c8db562 commit 90c5413

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/compiler/exec/LocalSearchInsCommand.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ class LocalSearchInsCommand(val myProject: Project, private val scope: String, v
6363
return@iterateContent true
6464
}
6565

66+
if (ProjectFileIndex.getInstance(project).isUnderIgnored(file)) return@iterateContent true
67+
/// skip for .idea/
68+
if (file.path.contains(".idea")) return@iterateContent true
69+
6670
val content = file.contentsToByteArray().toString(Charsets.UTF_8).lines()
6771
val matchedIndices = content.withIndex()
6872
.filter { (_, line) ->

0 commit comments

Comments
 (0)