Respect .gitattributes language and vendored definitions
In a .gitattributes file it is possible to map language names to filename extensions, e.g.
*.fs linguist-language=glsl
*.vs linguist-language=glsl
It is also possible to specify which directories are not to be counted by language analyzers, such as the one on this site.
**/vendor/** linguist-vendored
lib/json.h linguist-vendored
Pygount could respect these settings (and maybe some more attributes could be useful too, these two are the only ones I've used).
That's my suggestion.
Supporting gitignores would be helpful too, especially with CMake.
@875014 I am not sure I understand this suggestion. Do you mean:
If pygount detects a .gitattributes files with entries that set a linguist-language for certain file patterns, it should use this as language for the analysis instead of the language automatically assigned by Pygments.
Concerning gitignore. There is an existing (ancient) issue for that, which should cover your suggestion. If not, feel free to elaborate there. #20
If pygount detects a
.gitattributesfiles with entries that set alinguist-languagefor certain file patterns, it should use this as language for the analysis instead of the language automatically assigned by Pygments.
Yes, exactly like that.