【问题标题】:How to ignore files based on suffix in cloc..?如何忽略基于 cloc.. 中后缀的文件?
【发布时间】:2016-06-23 09:02:16
【问题描述】:

这应该是一项微不足道的任务,但通读文档和手册页或谷歌搜索都没有找到我想要实现的解决方案:

cloc 正在扫描我们的源代码树,我们希望它忽略所有 *.html 和 *.css 文件。

有没有办法给cloc 一个文件扩展名列表以忽略..?

【问题讨论】:

    标签: open-source lines-of-code cloc


    【解决方案1】:

    阅读帮助,通过cloc --help,给出:

    --exclude-ext=<ext1>[,<ext2>[...]] 
    Do not count files having the given file name extensions.
    

    我试过了

    cloc <file(s)/dir(s)> --exclude-ext=html,css
    

    它按预期工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-18
      • 1970-01-01
      相关资源
      最近更新 更多