Skip to content

Sourcegraph language stats are different from GitLab and GitHubs because it doesn't respect .gitattributes

Created by: eseliger

Both GitHub and GitLab use linguist to calculate language stats on a repo, which means they both support the linguist directives in .gitattributes files (which we also use in our repo to exclude fixtures and stuff). Since Sourcegraph doesn't support these directives (our language stats calculator is written by us), it leads to different results being returned than on GitHub and GitLab, which, at least at first glance, seems confusing. I think we should

  • Either make that clear in some way
  • Add support for linguist directives
  • Use linguist ourselves (probably more work, since we also want language stats for searches other than repos)