github-linguist / github-linguist/linguist

`linguist-fallback-language` attribute

Open
#6,395 10 comments 1 reaction 0 assignees View on GitHub
Improvement
Dominant language
Ruby
Stars
13.7k
Forks
5.4k
Avg merge
1d 15h
Merged PRs (30d)
17

Description

Currently, people using a newer language on Github either have to accept a total lack of support for the language, or use .gitattributes with `linguist-language` to select a syntax highlighter that's "good enough". However, what if the language is then added to Linguist? Now the .gitattributes that have accumulated would override the actual, correct detection. Therefore, I suggest a `linguist-fallback-language` attribute that would allow Linguist to still classify the file if it does know the language, but provides a fallback in case it's not known.

Contributor guide

Open the contributing guide

Research direction

The payload names no files or tests. Start by locating how .gitattributes and the existing linguist-language attribute are parsed and applied, then define coverage for known-language precedence and unknown-language fallback. Done means the fallback is used only when Linguist cannot identify the language, without overriding native detection.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.