首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > C/C++/VC++ > 伯爵在C / C++代码和注释行,生产基本指标

伯爵在C / C++代码和注释行,生产基本指标

  • 资源大小:4.26 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: 代码 CC 注释 基本 指标 生产

资 源 简 介

This is an Awk script that I wrote to compute C code metrics. It looks at code and comments via regular expressions and computes Lines of code (non-blank) Number of comments (multiline and single-line accounted for) Raw lines of text Total code Total comments Comment percentage The last is the most interesting. I"m a comment-zealot so mine tend to run about 24%. It"s old code, but works great and is really quite fast. Run it like so: awk -f lc.awk *.c I use a shell script called lc: #!/bin/sh# Script to call awk line-counting script# pfh 3/19/02awk -f ${HOME}/bin/lc.awk $*% Here"s an example, the Linux kernel 2.2.16: ----------File---Code---Comments---Raw Lines------------------------------------ sys.c 716 193 1025 panic.c 59 21 90 itimer.c 133 21 173 printk.c
VIP VIP
0.185714s