将gitattributes用于语言学家的例子

Vit*_*ing 13 github gitattributes github-linguist

有没有具体的例子,为了通过Linguist属性检测GitHub中的错误语言?

资料来源:https://github.com/github/linguist

  • 语言学家的文档
  • 语言学家,语言
  • 语言学家,vendored

pch*_*gno 22

可以在Linguist的README文件中找到示例.您可以通过linguist-language属性实现您想要的.

语言学家,语言

使用以下属性,Linguist将所有.rb文件检测为Java文件.

*.rb linguist-language=Java
Run Code Online (Sandbox Code Playgroud)

语言学家,vendored

使用以下属性,Linguist将special-vendored-path目录中的文件(请注意强制性尾随*)检测为已销售,并将其从统计信息中排除.

special-vendored-path/* linguist-vendored
Run Code Online (Sandbox Code Playgroud)

语言学家的文档

如果没有以下属性,Linguist会将该文件检测docs/formatter.rb文档并将其从统计信息中排除.

docs/formatter.rb linguist-documentation=false
Run Code Online (Sandbox Code Playgroud)

语言学家,检测

使用以下属性,Linguist计算统计信息中的SQL文件.如果没有此属性,则统计信息中只会计算编程语言和标记语言.

*.sql linguist-detectable=true
Run Code Online (Sandbox Code Playgroud)