意大利面条代码可视化软件?

发布于 2024-11-26 20:10:26 字数 1537 浏览 4 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

海夕 2024-12-03 20:10:26

我投票给 gnu global。它结合了 ctags/cscope 的所有功能,并且可以生成完全索引的 html,使您可以在您喜欢的浏览器中浏览代码。在 apache 中启动它,您就拥有了任何人都可以访问的 Web 服务,包括完整的搜索功能。

它很好地集成到 emacs/vim/甚至 bash-shell 中,您可以直接从 shell 提示符中使用它。

要查看它在 Linux 内核上的运行情况,请访问

将其与圈复杂度工具相结合eclipse 插件,用于计算代码的复杂性。除了圈复杂度之外,它还可以处理:

  • McCabe 的圈复杂度 传出
  • 耦合
  • 方法中缺乏
  • 内聚 方法中的代码行
  • 数 字段
  • 数 级别数
  • 范围内的局部数
  • 参数
  • 数 语句数
  • 每个类的加权方法

...你应该有你需要的一切。

My vote goes to gnu global. It has all the features of ctags/cscope combined as well as the possibility to generate fully indexed html which allows you to browse the code in your favorite browser. Fire it up in apache and you have a web-service that anyone can access including full search capabilities.

It integrates nicely into emacs/vim/even the bash-shell, and you can use it directly from the shell-prompt.

To see it in action on the linux kernel, visit this

Combine that with a tool for cyclomatic complexity plugin for eclipse which calculates the complexity of your code. besides the cyclomatic complexity it can handle:

  • McCabe's Cyclomatic Complexity
  • Efferent Couplings
  • Lack of Cohesion in Methods
  • Lines Of Code in Method
  • Number Of Fields
  • Number Of Levels
  • Number Of Locals In Scope
  • Number Of Parameters
  • Number Of Statements
  • Weighted Methods Per Class

...and you should have everything you need.

多情出卖 2024-12-03 20:10:26

如果您喜欢命令行;)也许您可以尝试 cscope,它会对代码进行静态分析,并可以告诉您在哪里引用了一些符号/变量/函数...不是圣杯,但浏览未知的源代码非常有用。

还有一些可以处理 csope 结果的 GUI(Vi、Emacs、JEdit...)。

另一方面,带有 CDT 插件的 Eclipse 也可以帮助您导航到您拥有的意大利面条式代码维持。

If you like command line ;) maybe you could try cscope, it does static analysis of code and can tell you where are referenced some symbols/variables/functions... Not the Holy Graal, but it can be pretty usefull to browse unknown source code.

There are also some GUI that can handle csope results (Vi, Emacs, JEdit...).

On the other hand, Eclipse with the CDT plugin can also help you to navigate into the spaghetti code you have to maintain.

怎会甘心 2024-12-03 20:10:26

它不是免费的,据我所知不是 Linux,但 cppDepend 可能值得评估 - 至少在有人提出更合适的建议之前:)

http ://www.cppdepend.com/ [此处演示视频]

It's not free and afaik not linux but cppDepend might be worth evaluating - at least until someone comes up with a more suitable suggestion :)

http://www.cppdepend.com/ [Demo video here]

若水微香 2024-12-03 20:10:26

如果您想知道在哪些函数中声明或引用了符号,您可以尝试 LXR。它不是基于控制台的,但非常有用。

If you'd like to know in which functions a symbol is declared or referenced you can try LXR. It's not console based, but is quite usable.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文