小编Ven*_*ing的帖子

CLOC忽略/排除列表文件(.clocignore)

(编辑:请参阅底部的正确用法部分.)

主要问题

你如何cloc使用它的--exclude-list-file=<file>选择?基本上,我正在尝试将其提供给.clocignore文件.

预期的行为

cloc 文档说明如下:

--exclude-list-file=<file>  Ignore files and/or directories whose names
                          appear in <file>.  <file> should have one entry
                          per line.  Relative path names will be resolved
                          starting from the directory where cloc is
                          invoked.  See also --list-file.
Run Code Online (Sandbox Code Playgroud)

尝试

以下命令按预期工作:

cloc --exclude-dir=node_modules .
Run Code Online (Sandbox Code Playgroud)

但是这个命令不排除任何东西:

cloc --exclude-list-file=myignorefile .
Run Code Online (Sandbox Code Playgroud)

这是以下内容myignorefile:

node_modules
node_modules/
node_modules/*
node_modules/**
./node_modules
./node_modules/
./node_modules/*
./node_modules/**
/full/path/to/current/directory/node_modules
/full/path/to/current/directory/node_modules/
/full/path/to/current/directory/node_modules/*
/full/path/to/current/directory/node_modules/**
Run Code Online (Sandbox Code Playgroud)

cloc如果不存在则不会出错myignorefile,所以我对它正在做的事情没有任何反馈. …

shell cloc

25
推荐指数
2
解决办法
1万
查看次数

标签 统计

cloc ×1

shell ×1