I was recently working on a github project in both JavaScript and C++, and noticed that github tagged the project as C++. If you have to pick a single language, this is prob
First, know that you can override the language detected for files in your repository using Linguist overrides.
Now, in a nutshell,
How does Linguist detect languages?
Linguist relies on the following strategies, in order, and returns the language as soon as it found a perfect match (strategy with a single language returned).
.h
) are refined by the subsequent strategies.What are unvendored and documentation files?
Linguist considers some files as vendored, meaning they are not included in language statistics. These include third-party libraries such as jQuery and are defined in the vendor.yml configuration file. You can also vendor or unvendor files in your repository using Linguist overrides.
Similarly, documentation files are defined in documentation.yml and can be changed using Linguist overrides.
How are generated files detected?
Linguist relies on simple rules to detect generated files, using both the paths and the content of files. Generated files are not counted in language statistics and are not displayed in diffs on github.com.
What about programming and markup languages?
In Linguist, each language is given a type. These types can be found in the main configuration file, languages.yml. Only the programming and markup languages are counted in statistics.