语言学家供应商和语言学家语言在 .gitattributes 文件中不起作用
linguist-vendored and linguist-language not working in .gitattributes file
我正在尝试使用 .gitattributes 使用 linguist-language=C
指定所有 .h
文件的语言,并使用 linguist-vendored
确保语言学家不在其计数中包含 SFML 库.我计算了我项目中的所有行(当然没有库),总行数是 529。我计算了我的 .c
和 Makefile
文件(不是 .h 文件)中的所有行) 总共有 31 行。我不是数学家,但 .c
和 Makefile
文件约占我项目的 5%,但在提交 .gitattributes
文件指定不计算包含文件后,它说C++ 占我项目的 99.7%,当它应该是大约 95 时。我不知道问题是什么。这是 .gitattributes
文件:
*.h linguist-language=C
./include/SFML/* linguist-vendored
这是 GitHub 回购的 link:https://github.com/reimeytal/pandemic-simulator
任何帮助表示赞赏。谢谢。
语言学家计算的不是每种语言的代码行数,而是字节数。
来源。 来自 Linguist's README:
The result of this analysis is used to produce the language stats bar which displays the languages percentages for the files in the repository. The percentages are calculated based on the bytes of code for each language as reported by the List Languages API.
我正在尝试使用 .gitattributes 使用 linguist-language=C
指定所有 .h
文件的语言,并使用 linguist-vendored
确保语言学家不在其计数中包含 SFML 库.我计算了我项目中的所有行(当然没有库),总行数是 529。我计算了我的 .c
和 Makefile
文件(不是 .h 文件)中的所有行) 总共有 31 行。我不是数学家,但 .c
和 Makefile
文件约占我项目的 5%,但在提交 .gitattributes
文件指定不计算包含文件后,它说C++ 占我项目的 99.7%,当它应该是大约 95 时。我不知道问题是什么。这是 .gitattributes
文件:
*.h linguist-language=C
./include/SFML/* linguist-vendored
这是 GitHub 回购的 link:https://github.com/reimeytal/pandemic-simulator 任何帮助表示赞赏。谢谢。
语言学家计算的不是每种语言的代码行数,而是字节数。
来源。 来自 Linguist's README:
The result of this analysis is used to produce the language stats bar which displays the languages percentages for the files in the repository. The percentages are calculated based on the bytes of code for each language as reported by the List Languages API.