From 4d6a8008ed8b81479ef13cce75b776363910313a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20W=C3=A5reus?= Date: Wed, 20 Mar 2024 09:51:01 +0100 Subject: [PATCH] Update debricked-call-graph file names --- .gitignore | 2 +- internal/callgraph/language/golang/callgraph_test.go | 4 ++-- internal/callgraph/language/golang/job.go | 2 +- internal/callgraph/language/golang/job_test.go | 4 ++-- internal/callgraph/language/java11/job.go | 2 +- test/callgraph/maven_test.go | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 8dde89b5..2b31cbc7 100644 --- a/.gitignore +++ b/.gitignore @@ -43,5 +43,5 @@ test/resolve/testdata/gradle/*/** **.gradle-init-script.debricked.groovy test/resolve/testdata/gradle/gradle.debricked.lock /mvnproj/target -debricked-call-graph-golang +debricked-call-graph.* internal/scan/testdata/npm/result.json diff --git a/internal/callgraph/language/golang/callgraph_test.go b/internal/callgraph/language/golang/callgraph_test.go index 98f2582d..1fc220a7 100644 --- a/internal/callgraph/language/golang/callgraph_test.go +++ b/internal/callgraph/language/golang/callgraph_test.go @@ -40,10 +40,10 @@ func TestCleanSymbol(t *testing.T) { func TestCallGraphGeneration(t *testing.T) { rootFileDir := filepath.Dir("testdata/fixture/app.go") - outputName := "debricked-call-graph-golang-test" + outputName := "debricked-call-graph.golang-test" defer func() { - err := os.Remove("testdata/fixture/debricked-call-graph-golang-test") + err := os.Remove("testdata/fixture/debricked-call-graph.golang-test") if err != nil { fmt.Println(err) } diff --git a/internal/callgraph/language/golang/job.go b/internal/callgraph/language/golang/job.go index 51548680..1dbe2bec 100644 --- a/internal/callgraph/language/golang/job.go +++ b/internal/callgraph/language/golang/job.go @@ -12,7 +12,7 @@ import ( ) const ( - outputName = "debricked-call-graph-golang" + outputName = "debricked-call-graph.golang" ) type Job struct { diff --git a/internal/callgraph/language/golang/job_test.go b/internal/callgraph/language/golang/job_test.go index ee9e90ea..d8ec0d21 100644 --- a/internal/callgraph/language/golang/job_test.go +++ b/internal/callgraph/language/golang/job_test.go @@ -41,7 +41,7 @@ func TestNewJob(t *testing.T) { func TestRun(t *testing.T) { defer func() { - err := os.Remove("testdata/fixture/debricked-call-graph-golang") + err := os.Remove("testdata/fixture/debricked-call-graph.golang") if err != nil { fmt.Println(err) } @@ -59,7 +59,7 @@ func TestRun(t *testing.T) { fmt.Println(j.Errors().GetAll()) assert.False(t, j.Errors().HasError()) - _, err := os.Stat("testdata/fixture/debricked-call-graph-golang") + _, err := os.Stat("testdata/fixture/debricked-call-graph.golang") assert.False(t, os.IsNotExist(err)) } diff --git a/internal/callgraph/language/java11/job.go b/internal/callgraph/language/java11/job.go index 7cf14ac0..78592aba 100644 --- a/internal/callgraph/language/java11/job.go +++ b/internal/callgraph/language/java11/job.go @@ -17,7 +17,7 @@ const ( maven = "maven" gradle = "gradle" dependencyDir = ".debrickedTmpFolder" - outputName = "debricked-call-graph-java" + outputName = "debricked-call-graph.java" ) type Job struct { diff --git a/test/callgraph/maven_test.go b/test/callgraph/maven_test.go index d1152e9e..11192b57 100644 --- a/test/callgraph/maven_test.go +++ b/test/callgraph/maven_test.go @@ -15,7 +15,7 @@ func TestGenerateCallgraph(t *testing.T) { mavenProjectPath := filepath.Join("testdata", "mvnproj-build") tmpFolder := filepath.Join(mavenProjectPath, ".debrickedTmpFolder") targetFolder := filepath.Join(mavenProjectPath, "target") - callgraphFile := filepath.Join(mavenProjectPath, "debricked-call-graph-java") + callgraphFile := filepath.Join(mavenProjectPath, "debricked-call-graph.java") assert.NoDirExists(t, tmpFolder) assert.NoDirExists(t, targetFolder) @@ -43,7 +43,7 @@ func TestGenerateCallgraphNoBuild(t *testing.T) { mavenProjectPath := filepath.Join("testdata", "mvnproj-no-build") tmpFolder := filepath.Join(mavenProjectPath, ".debrickedTmpFolder") targetFolder := filepath.Join(mavenProjectPath, "target") - callgraphFile := filepath.Join(mavenProjectPath, "debricked-call-graph-java") + callgraphFile := filepath.Join(mavenProjectPath, "debricked-call-graph.java") assert.NoFileExists(t, callgraphFile) tmpFolderInfoBefore, tmpErr := os.Stat(tmpFolder)