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
2
votes
2 answers

Why did GitHub decide my (100% C) repository was 50% C++?

I have a GitHub repository that is C-only. After my latest commit, in which I modified preprocessor spacing in a header file, GitHub decided my repository was 50.2% C++. I clicked on the link to look at the C++ code and it showed my header file…
MD XF
  • 7,860
  • 7
  • 40
  • 71
2
votes
1 answer

How do I speed up repeated calls a ruby program (github's linguist) from python?

I'm using github's linguist to identify unknown source code files. Running this from the command line after a gem install github-linguist is insanely slow. I'm using python's subprocess module to make a command-line call on a stock Ubuntu 14…
Hooked
  • 84,485
  • 43
  • 192
  • 261
1
vote
1 answer

github-linguist command shows the correct statistics but GitHub server is not getting updated after a few days

I've been trying to work with github-linguist for a while and it still gives a bit of problem. After a few days of trying to figure out different issues with the language statistics, I managed to set .githubattributes with the right commands to get…
1
vote
1 answer

Ignore other library files in GitHub so they do not appear in project's (programming) Languages

Solution: Create .gitattributes in git folder and paste linguist-languate=text after the file path. Example: /other_libraries/* linguist-language=text /linguist_ignore.c linguist-language=text Note: linguist-vendored=false didn't solve the problem.…
CodingTea
  • 15
  • 4
1
vote
1 answer

github-linguist including files with linguist-vendored attribute in language statistics

I have a github repository that is predominately C++ but has lots of vendor-generated C code (drivers for a microcontroller) that is completely throwing off the language statistics. I have read this page and I have created a .gitattributes file in…
unknownperson
  • 339
  • 1
  • 9
1
vote
3 answers

Why is languages section not displayed my github repository?

Why is languages section not displayed on my github repository? My Repository is https://github.com/alumuko/vanilla-datetimerange-picker I found a question GitHub not showing languages used in repository So I have added ".gitattributes" in my…
Alumuko
  • 171
  • 2
  • 11
1
vote
1 answer

How can I remove a file from linguist in github?

I have a golang project, but am using a bit of c++. I downloaded a header file dependency, nlohmann/json, and is 22875 lines long, so naturally my github languages is not showing the proper language (Go) and is instead showing c++. How can I remove…
Ank i zle
  • 2,089
  • 3
  • 14
  • 36
1
vote
1 answer

.gitattributes file isn't excluding files from the language statistics

I am currently learning OpenGL and am uploading my program to GitHub. However, because the dependencies are included in the language statistics the statistics are massively inflated. I have attempted to write a .gitattributes file to sort this…
1
vote
1 answer

Does GitHub Linguist's languages.yml allow wildcards in extensions?

Let's say we have a programming language that uses files with various extensions, all of which share some characters that indicate the language, but continues with additional characters that indicates the type of content. Take for example from the…
Adám
  • 6,573
  • 20
  • 37
1
vote
1 answer

Can I use GitHub's Linguist as a replacement to Rouge in Jekyll

I want to improve syntax highlighting on my blog written in Jekyll. I've noticed that some languages (e.g. Scala) are not always correctly highlighted by Rouge (it performs wrong tokenization). In the same time GitHub's code examples and Gists are…
Mateusz Kubuszok
  • 24,995
  • 4
  • 42
  • 64
1
vote
1 answer

How can I highlight .gitignore code for my README.md?

I wrote a README.md with parts of code and I want to highlight those parts with the right colors. One of this code is a .gitignore code, that I would like to integrate to my README.md. But I can't have the good linguist highlight for this, which…
1
vote
1 answer

How can I use the languages YAML file to determine which keywords work for any given language?

There is a page on GitHub Help describing how to use syntax-highlighted code blocks. On that page there are instructions describing how to match languages to their keywords for this purpose: We use Linguist to perform language detection and syntax…
Sam Estep
  • 12,974
  • 2
  • 37
  • 75
1
vote
1 answer

How one can make github linguist take *.Rnw files into account of repository language statistics?

I've got many repos containing files written with LaTeX and R with knitr so the filenames' extensions are "Rnw". Files with these extensions are not taken into account by github linguist. How can we fix that? Tangling all the files to extract R…
konstunn
  • 355
  • 4
  • 17
1
vote
3 answers

Github shows 4% of repository is in a language that is not used in repository

I have a personal repository on GitHub that is completely written in C#, with a few XML configuration files, and some PowerShell files from included NuGet packages. On the main repository page, GitHub shows a colored bar to display the breakdown of…
JamesFaix
  • 8,050
  • 9
  • 37
  • 73
1
vote
1 answer

Running bundle exec linguist --breakdown fails

When I run bundle exec linguist --breakdown on the root directory, I get the following error: No such file or directory @ rb_sysopen - /Users/George/linguist/lib/linguist/samples.json (Errno::ENOENT) How can I correct this?
George L
  • 1,673
  • 2
  • 26
  • 39