Skip to content

Commit

Permalink
Update CodeScanSessionConfig.kt to change gitIgnoreParser to `featu…
Browse files Browse the repository at this point in the history
…reDevSessionContext`
  • Loading branch information
ashishrp-aws committed Apr 15, 2024
1 parent 1c923e7 commit d043d97
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class CodeScanSessionConfig(

private var isProjectTruncated = false

private val gitIgnoreParser = FeatureDevSessionContext(project)
private val featureDevSessionContext = FeatureDevSessionContext(project)

/**
* Timeout for the overall job - "Run Security Scan".
Expand Down Expand Up @@ -157,7 +157,7 @@ class CodeScanSessionConfig(
} else {
VfsUtil.collectChildrenRecursively(projectRoot).filter {
!it.isDirectory && !it.`is`((VFileProperty.SYMLINK)) && (
!gitIgnoreParser.ignoreFile(it)
!featureDevSessionContext.ignoreFile(it)
)
}.fold(0L) { acc, next ->
totalSize = acc + next.length
Expand Down Expand Up @@ -193,7 +193,7 @@ class CodeScanSessionConfig(
if (selectedFile.path.startsWith(projectRoot.path)) {
files.addAll(
VfsUtil.collectChildrenRecursively(projectRoot).filter {
it != selectedFile && !it.isDirectory && !gitIgnoreParser.ignoreFile(it)
it != selectedFile && !it.isDirectory && !featureDevSessionContext.ignoreFile(it)
}
)
}
Expand Down

0 comments on commit d043d97

Please sign in to comment.