未验证 提交 1b918f24 编写于 作者: P Phodal Huang

refactor: rename call_Graph to call

上级 014e17b7
......@@ -7,7 +7,7 @@ import (
"github.com/phodal/coca/config"
"github.com/phodal/coca/core/ast"
. "github.com/phodal/coca/core/ast/api"
"github.com/phodal/coca/core/context/call_graph"
"github.com/phodal/coca/core/context/call"
"github.com/phodal/coca/core/domain"
. "github.com/phodal/coca/core/infrastructure"
"github.com/spf13/cobra"
......@@ -68,7 +68,7 @@ var apiCmd = &cobra.Command{
restFieldsApi := filterApi(apiPrefix, restApis)
analyser := call_graph.NewCallGraph()
analyser := call.NewCallGraph()
dotContent, counts := analyser.AnalysisByFiles(restFieldsApi, parsedDeps, diMap)
if *&apiCmdConfig.Sort {
......
......@@ -4,7 +4,7 @@ import (
"encoding/json"
"github.com/phodal/coca/cmd/cmd_util"
"github.com/phodal/coca/config"
. "github.com/phodal/coca/core/context/call_graph"
. "github.com/phodal/coca/core/context/call"
"github.com/phodal/coca/core/domain"
. "github.com/phodal/coca/core/infrastructure"
"github.com/spf13/cobra"
......
package call_graph
package call
import (
"github.com/phodal/coca/core/domain"
......
package call_graph_test
package call_test
import (
"encoding/json"
. "github.com/onsi/gomega"
"github.com/phodal/coca/core/context/call_graph"
"github.com/phodal/coca/core/context/call"
"github.com/phodal/coca/core/domain"
"github.com/phodal/coca/core/infrastructure"
"path/filepath"
......@@ -15,7 +15,7 @@ func Test_should_generate_correct_files(t *testing.T) {
g := NewGomegaWithT(t)
var parsedDeps []domain.JClassNode
analyser := call_graph.NewCallGraph()
analyser := call.NewCallGraph()
codePath := "../../../_fixtures/call/call_api_test.json"
codePath = filepath.FromSlash(codePath)
......
package call_graph
package call
type CallApiCount struct {
HttpMethod string
......
......@@ -2,7 +2,7 @@ package concept
import (
"github.com/phodal/coca/config"
languages2 "github.com/phodal/coca/core/context/call_graph/stop_words/languages"
languages2 "github.com/phodal/coca/core/context/call/stop_words/languages"
"github.com/phodal/coca/core/domain"
"github.com/phodal/coca/core/infrastructure"
)
......
......@@ -2,7 +2,7 @@ package rcall
import (
"encoding/json"
"github.com/phodal/coca/core/context/call_graph"
"github.com/phodal/coca/core/context/call"
"github.com/phodal/coca/core/domain"
"github.com/phodal/coca/core/infrastructure"
)
......@@ -25,7 +25,7 @@ func (c RCallGraph) Analysis(funcName string, clzs []domain.JClassNode) string {
graphvizReverse := "rankdir = LR;\nedge [dir=\"back\"];\n"
chain = graphvizReverse + chain
dotContent := call_graph.ToGraphviz(chain)
dotContent := call.ToGraphviz(chain)
return dotContent
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册