Eclipse PyDev 项目中的代码行
我想知道是否有人在非 Java 项目中使用 Eclipse Metrics 插件(特别是我我正在尝试为几个 PyDev 项目生成代码指标)。我已经阅读了 Metrics 项目的演练,但它表明我应该在访问项目的属性之前进入 Java 透视图,并且我应该找到 Metrics 部分。无论我打开哪个视角,我的 PyDev 项目都没有得到这一点。任何建议或意见都会很棒。
I'm wondering if anyone has had any luck using the Eclipse Metrics Plugin with Projects that are not in Java (specifically I'm trying to generate code metrics for a couple of PyDev Projects). I've read through the walk-through for the Metrics project but it indicates that I should be in the Java Perspective before accessing the Properties for my Project and that I should find a Metrics section. I don't get that for my PyDev Projects regardless of which Perspective I have open. Any suggestions or advice would be great.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不知道是否可以让插件与 pydev 项目一起使用,但如果它只是您所追求的
lines-of-code
指标,您可以在项目的根目录中运行此代码段:I don't know if it's doable to get the plugin to work with pydev projects, but if it's just the
lines-of-code
metric you are after, you could run this snippet in your project's root directory:如果您使用的是 Linux...
您看过 cloc 吗?
它产生相当完整的输出,并接受几个选项:
它也可以在 Ubuntu 存储库中找到。
If you are in Linux...
Have you taken a look to cloc?
It produces pretty complete outputs, and accepts several of options:
It is available in the Ubuntu repositories, as well.
在 Unix 上,您可以从终端运行以下命令:
如果您不想计算注释,则需要一个更好的正则表达式...
On Unix you can run the following from the terminal:
If you want to not count comments, you need a better regular expression...