在 linguist
上的 GitHub 文档中, section关于使用 .gitattributes
文件说一个路径可以被标记为vendored,因此在存储库的统计跟踪中被忽略,具有:
special-vendored-path/* linguist-vendored
但是,是否可以将语言学家标记为可嵌套在包含非供应商代码的目录中的供应商目录?
我尝试添加样式为
*/special-vendored-path/* linguist-vendored
的线条到我的 .gitattributes
,但这并没有导致 GitHub 代码比例信息发生变化。
最佳答案
要匹配任意目录树中的目录,您需要 双星号 :
**/special-vendored-path/* linguist-vendored
但是请注意,路径末尾不需要双星号。例如,
test1/*
将匹配 test1/test2/test3/file
.
关于github - GitHub Linguist 是否支持linguist-vendored 的前缀通配符?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39060111/