Skip to content

Commit

Permalink
javasrc2cpg - add YAML files as configuration files (#4007)
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierpinho authored Dec 21, 2023
1 parent bd76501 commit 38ba540
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ class ConfigFileCreationPass(cpg: Cpg) extends XConfigFileCreationPass(cpg) {
pathEndFilter("build.gradle"),
pathEndFilter("build.gradle.kts"),
// ANDROID
pathEndFilter("AndroidManifest.xml")
pathEndFilter("AndroidManifest.xml"),
// SPRING
extensionFilter(".yaml"),
extensionFilter(".yml")
)

private def mybatisFilter(file: File): Boolean = {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
key: value
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
key: value
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ class ConfigFileCreationPassTests extends JavaSrcCode2CpgFixture {
Paths.get(absoluteConfigDir, "struts.xml").toString,
Paths.get(absoluteConfigDir, "web.xml").toString,
Paths.get(absoluteConfigDir, "build.gradle").toString,
Paths.get(absoluteConfigDir, "build.gradle.kts").toString
Paths.get(absoluteConfigDir, "build.gradle.kts").toString,
Paths.get(absoluteConfigDir, "basic.yaml").toString,
Paths.get(absoluteConfigDir, "basic.yml").toString
)
}

Expand Down

0 comments on commit 38ba540

Please sign in to comment.