Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Language filters should use more than extension (including hints from file) when determining language of a file #45736

Closed
mike-r-mclaughlin opened this issue Dec 15, 2022 · 1 comment
Labels
customer Important issues reported or desired by a customer. team/search-platform Issues owned by the search platform team

Comments

@mike-r-mclaughlin
Copy link
Contributor

mike-r-mclaughlin commented Dec 15, 2022

Provided by: https://github.com/sourcegraph/accounts/issues/6716 [Recording: https://drive.google.com/file/d/14ZdQ3U9pKCsbkonyk0KkqWsHUH2g_D-R/view]

Feedback

A user ran a query that resulted in 109 results. All were YAML files. However in the filters section, the "languages" showed "MiniYAML 108". There was nothing indicating what the other 1 result was (until we filtered out MiniYAML to see what it thought it was). User asked: What is the difference between MiniYAML and YAML?

image

Feedback:

  • Make it easier to figure out how Sourcegraph is determining what language a file is?(Q: Can Sourcegraph parse a hint at the top of the file?)
  • Could Sourcegraph use something similar to what GItHub uses (linguist) for language detection?

/cc @sourcegraph/search-core

@mike-r-mclaughlin mike-r-mclaughlin added customer Important issues reported or desired by a customer. team/search-platform Issues owned by the search platform team labels Dec 15, 2022
@jtibshirani
Copy link
Member

We've made a lot of improvements here recently, including better handling for ambiguous extensions like .yaml.

We're also working to make language filters more precise by looking at the contents of a file, not just the filename: https://github.com/sourcegraph/sourcegraph/issues/60341. To keep things simple, I'm going to close out this issue in favor of that tracking issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
customer Important issues reported or desired by a customer. team/search-platform Issues owned by the search platform team
Projects
Development

No branches or pull requests

2 participants