Skip to content

Problem with language stats even when using .gitattributes #6211

Answered by lildude
recleun asked this question in Classification
Discussion options

You must be logged in to vote

As your repo stands, if you removed the .gitattributes file only two files will be considered by Linguist: the two index.* files. Everything else is already ignored by default, though keep in mind clicking the language actually takes you to Search which doesn't ignore the files like Linguist does else you'd never find them.

So the reason you only saw JavaScript initially and needed to implement an override for your TypeScript file is because of the very first line in the file: #! /usr/bin/env node.

This is a modeline indicating the interpreter of the file. node is not a valid TypeScript interpreter and is thus only associated with JavaScript in Linguist, however modelines take precedence …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@recleun
Comment options

@lildude
Comment options

@recleun
Comment options

Answer selected by recleun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants