Skip to content

Commit f0911c4

Browse files
authored
Adding more extensions and no extension files to test generation usecase ignore list. (#5389)
1 parent 93b3b5a commit f0911c4

File tree

1 file changed

+17
-1
lines changed
  • plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/util

1 file changed

+17
-1
lines changed

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/util/GitIgnoreFilteringUtil.kt

+17-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ class GitIgnoreFilteringUtil(
5656
"*.a",
5757
"*.map",
5858
"*.graph",
59-
"*.so"
59+
"*.so",
60+
"*.csv",
61+
"*.dylib",
62+
"*.parquet",
63+
"*.xlsx"
6064
)
6165
)
6266
}
@@ -101,6 +105,18 @@ class GitIgnoreFilteringUtil(
101105

102106
suspend fun ignoreFile(file: VirtualFile): Boolean {
103107
// this method reads like something a JS dev would write and doesn't do what the author thinks
108+
109+
// ignores no extension files for test generation use case.
110+
val allowedNoExtFiles = setOf("Config", "Dockerfile", "README")
111+
if (useCase == CodeWhispererConstants.FeatureName.TEST_GENERATION &&
112+
!file.isDirectory &&
113+
file.extension.isNullOrEmpty() &&
114+
!allowedNoExtFiles.any {
115+
it.equals(file.name, ignoreCase = true)
116+
}
117+
) {
118+
return true
119+
}
104120
val deferredResults = ignorePatternsWithGitIgnore.map { pattern ->
105121
withContext(coroutineContext) {
106122
// avoid partial match (pattern.containsMatchIn) since it causes us matching files

0 commit comments

Comments
 (0)