Questions tagged [github-linguist]

Linguist is a ruby library developed and used on GitHub.com to detect blob languages, ignore binary or vendored files, suppress generated files in diffs, and generate language breakdown graphs.

Linguist is a ruby library developed and used on GitHub.com to detect blob languages, ignore binary or vendored files, suppress generated files in diffs, and generate language breakdown graphs.

65 questions
143
votes
14 answers

GitHub changes repository to the wrong language

I know this isn't a huge deal, but I like my GitHub to be linguistically diversified. I wrote a project in Swift and when I commit it says it's in Objective-C. I think it might be because the Parse frameworks are written in Objective-C and it…
Echizzle
  • 3,359
  • 5
  • 17
  • 28
93
votes
5 answers

How does github figure out a project's language?

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 probably the correct designation since the C++ code is compiled as a JavaScript…
Justin Ethier
  • 131,333
  • 52
  • 229
  • 284
43
votes
1 answer

Using gitattributes for linguist examples

Are there any concrete examples, in order to detect wrong languages in GitHub via Linguist attributes? Source: https://github.com/github/linguist linguist-documentation linguist-language linguist-vendored
Vitali
  • 547
  • 2
  • 6
  • 13
20
votes
3 answers

Is there a way to ignore calculating language statistics for a directory on Github?

I am currently creating a lot of small experimental game projects in Lua that include a framework written in C, which dominates the code percentages and declares my project as being in C when it is not. I do however want to keep this framework, as…
Dizzykiwi
  • 485
  • 4
  • 10
18
votes
3 answers

Syntax highlighting on GitHub's Wiki: Specifying the programming language

GitHub uses something known as the "GitHub Flavored Markdown" for messages, issues and comments. My questions are: Does GitHub also use this syntax for their Wiki? From what I understand one can specify the programming language for syntax…
Amelio Vazquez-Reina
  • 91,494
  • 132
  • 359
  • 564
17
votes
2 answers

Changing repository language on GitHub

I've noticed that Github picked JavaScript as the language for my Django app: Is it possible to change it to Python? Or do I need to make a new repository? Solved: As @Geno Chen said, to change the repository language we have to add the file…
user11126055
15
votes
3 answers

Is it possible to define own syntax on a GitHub repository?

I'm writing a small DSL, and I'm curious if it's possible to somehow show it in a language bar above the repository source where all languages are listed by percentage of using or GitHub administration needs to allow that language? For example, I'm…
Nikola Stojaković
  • 2,257
  • 4
  • 27
  • 49
15
votes
4 answers

Github language tag for Repository

On Github, some projects are tagged as being of one language or another. How do I add one of these tags. (Objective C, PHP etc.)
David Beck
  • 10,099
  • 5
  • 51
  • 88
13
votes
2 answers

Custom language in github repository

Git shows the percentage of what languages make up a repository. However, for one of my projects I want to use my own custom language. I know I can create a .gitattributes file and place *.py linguist-language=Python to make all py files recognized…
Spooky
  • 1,752
  • 21
  • 37
7
votes
1 answer

How can .gitattributes be used to get Github to display the correct primary language for a repo?

I wrote a program in Python and used Bootstrap for its frontend. When I upload the directory on GitHub it shows that the project is 90% JavaScript and only 7.5% Python. I understand that this is happening because of the JS directory in the Bootstrap…
Eshaan Sharma
  • 85
  • 1
  • 4
7
votes
2 answers

Github misclassifies Matlab .m files as Objective-C files

I'm new to Git and I'm trying to push my local branch to the remote directory on Github. My project is on Matlab, so the files have .m extension. They naturally don't show any objective-c language pattern. I even checked in some .mat files. But they…
wceo
  • 934
  • 3
  • 18
  • 40
5
votes
1 answer

How to set a custom extension-to-language mapping on GitHub without adding a new language to Linguist

My repo has several *.sb files containing smartBASIC source code. The files do not show up in language bar of the repo (because smartBASIC and its associated filename extension are not part of default Linguist definitions). Mapping sb extension to…
Petr Vepřek
  • 1,547
  • 2
  • 24
  • 35
4
votes
1 answer

.gitattributes linguist attributes standard

I've just created a new Laravel project, and I'm setting up my .gitattributes Linguist attributes. Problem is, I'm not sure which ones to set for which files/directories. The default .gitattributes file looks like this : * text=auto *.css…
4
votes
0 answers

What are the differences between skylighting, pygments and Linguist?

Aside from being written in haskell, python and ruby, what are the main differences between skylighting, pygments and Linguist? Do they vary widely in the language support? Do they have different internal structures? To what extent can they be used…
mpacer
  • 3,009
  • 2
  • 16
  • 15
4
votes
2 answers

Paths not excluded from Github language statistics

I've already read about related SO threads here and here, as well as Github Linguist manual override, but I cannot seem to be able to exclude some top-level directories from language statistics. At its current latest version, this repo shows a…
superjos
  • 12,189
  • 6
  • 89
  • 134
1
2 3 4 5