Scala源代码指标工具(代码行,注释行等) [英] Scala source code metrics tool (lines of code, lines of comments and so on)

查看:112
本文介绍了Scala源代码指标工具(代码行,注释行等)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

似乎有很多支持Java语言的代码分析工具,但是到目前为止,我还找不到支持scala的工具(有些东西很简单,例如找到LOC会很好)?我在intellij工作,因此尝试了metricsReloaded和Static插件,但它们完全忽略了scala文件.

There seems to be so many code analysis tools supporting the java language, but I am so far unable to find one that supports scala (something simple like finding LOC would be nice)? I'm working in intellij so have tried metricsReloaded and Static plugins, but they are completely ignoring the scala files.

任何建议将不胜感激..:)

Any suggestions would be appreciated.. :)

所需的指标就像代码行,注释行(占注释的百分比)之类的简单内容

Metrics needed is just something like lines of code, lines of comment (% of comments), simple stuff like that

谢谢大家,两个答案都很有用. :)我只需要选择一个任意的正确"答案即可(只需将其投给票数最少的人即可.

Thanks everyone, both answers were useful. :) I had to just choose an arbitrary "correct" answer (just gave it to the one with least votes up.

推荐答案

我使用cloc,效果很好.它几乎可以理解任何语言或脚本,易于安装-作为Linux上的软件包提供,并且易于使用.它还可以输出为csv, xml, yaml, sql, etc之类的多种格式.这是我的一个项目的示例输出:

I use cloc and it works just fine. It understands pretty much any language or script out there, it's easy to install - comes as a package on Linux, and easy to use. It can also output to multiple formats like csv, xml, yaml, sql, etc. Here is an example output of one of my projects:

# cloc .

    1145 text files.
     853 unique files.                                          
     937 files ignored.

http://cloc.sourceforge.net v 1.60  T=23.05 s (25.5 files/s, 8260.4 lines/s)
--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
XML                             383            311             26         150875
Javascript                       18           2330            948           9904
Scala                           132           1689           1901           8029
CSS                               8           1266            163           7373
HTML                             23            459             91           2835
SQL                              11             11              5            877
XSLT                              1             30             16            468
Bourne Shell                      9             57            108            240
Perl                              1             57            102            227
Bourne Again Shell                1              2              0              3
DOS Batch                         1              0              0              2
--------------------------------------------------------------------------------
SUM:                            588           6212           3360         180833
--------------------------------------------------------------------------------

这篇关于Scala源代码指标工具(代码行,注释行等)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆