Closed kangyujian closed 1 year ago
the Golang support was removed, the parsed exist in https://github.com/modernizing/coca/tree/master/pkg/infrastructure/ast/ast_go
thank for your suggest. I want input a golang project local path , and get the function was called count each method, weather I can use your project. the main reason is to analysis code coupling in golang project. 感谢您的建议,我这边希望输入一个golang项目的本地路径,希望获取到项目中每一个函数被引用的次数,用此来检测代码的耦合度,请问您有一些工具或者方法吗?我自己尝试写,不太能写出来。
理论上用 Coca 也可以实现,Coca 里的 Go 解析已经移动到这里了:https://github.com/modernizing/chapi
不过,我觉得直接去找基于 Golang parser 的依赖分析工具会比 Antlr 写的靠谱得多,至少语言版本是最新的。Antlr 适用于跨语言的,详细可以看这个:https://github.com/modernizing/modernization
cd my_project
,my_project is a golang projectgo mod tidy
, get the depend of the projectcoca analysis