Fixing Bug in Github Linguist

in #utopian-io7 years ago (edited)

Repository

https://github.com/github/linguist
This was my first contribution to the Linguist project. It is widely used in every repository present on Github.

Bug Fixes

  • What was the issue(s)?
    The issue was of a misidentified language LLVM-MIR as Mirah.
    cas.png
    This bug affected the language statistics of thousands of repositories around github. LLVM has a small obscure format known as MIR which stands for MachineIR. This is currently being recognized as Mirah language due to the file extension .mir.
    This could be detected by using LLVM MIR's keywords like liveins: body: tracksRegLiveness etc

  • What was the solution?
    The solution consisted of confirming that whether the extension for Mirah is .mir or not. So, I created an issue on Mirah's official repository which resulted that .mir was not an extension for Mirah. But, Linguist has been classifying .mir as Mirah ever since it was created. Therefore this was a 7 year old bug. I dived deep into all the stuff and gathered examples for LLVM-MIR, made changes to the languages.yml file and created a pull request at https://github.com/github/linguist
    This is my pull request https://github.com/github/linguist/pull/4126
    The issue/bug it solved is https://github.com/github/linguist/issues/4113
    The issue for research about .mir at Mirah's github is
    https://github.com/mirah/mirah/issues/462

Now, LLVM-MIR is considered as a YAML format, which it actually is and now Github Linguist provides better and correct statistics for thousands of repositories out there on github, just because of a bug fix that I provided. This is a bug fix as It had been over 7 years that Linguist has been misclassifying the language as Mirah.

Github Linguist

  • What is the project about?
    This library is used on GitHub.com to detect blob languages, ignore binary or vendored files, suppress generated files in diffs, and generate language breakdown graphs.
  • Technology Stack
    Primarily Ruby and a lot of YAML files
  • How to contribute?
    You can go and check the repository for Github Linguist.

GitHub Account

You can get in touch with me and my work
twitter@gabru_md
https://github.com/gabru-md

It feels really awesome to be a contributor to a widely used project.

Sort:  

Thank you for contributing to this project. However this bug fix doesn't qualifies for an utopian reward. Please check https://join.utopian.io/guidelines/#, navigate to Contributions and then click the development icon to reveal the rules regarding that category

Your contribution has been evaluated according to Utopian rules and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post,Click here


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Coin Marketplace

STEEM 0.27
TRX 0.21
JST 0.038
BTC 96824.35
ETH 3678.06
USDT 1.00
SBD 3.88