16

git代码空行、注释分析与统计-功夫猫

 3 years ago
source link: https://blog.51cto.com/yangrong/2542949
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
该段代码特点: 1. 通过filepath的后缀,判断文件里包含的语言 2. 获取该次提交的代码,里面注释和空行的增加数和删除数 3. 支持文件类型,py,sh,java,rb,vue,html,js,xml,sql,css等 4. 如果需要支持更多的语言代码分析,在luanges里加入对应的key即可,single代表单行注释,multi代表多行注释。

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK