mirror of
https://gitea.com/gitea/gitea-mirror.git
synced 2026-03-20 03:40:27 +00:00
Fix linguist-detectable attribute being ignored for configuration files (#36640)
Fixes: go-gitea/gitea#36637. `linguist-detectable` must be able to override the config classification. --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -214,6 +214,17 @@ func TestLinguist(t *testing.T) {
|
||||
},
|
||||
ExpectedLanguageOrder: []string{"Markdown"},
|
||||
},
|
||||
// case 14: linguist-detectable on a configuration/data file (YAML) without linguist-language
|
||||
{
|
||||
GitAttributesContent: "*.yaml linguist-detectable",
|
||||
FilesToAdd: []*files_service.ChangeRepoFile{
|
||||
{
|
||||
TreePath: "config.yaml",
|
||||
ContentReader: strings.NewReader("name: test\ndescription: A test yaml file\n"),
|
||||
},
|
||||
},
|
||||
ExpectedLanguageOrder: []string{"YAML"},
|
||||
},
|
||||
}
|
||||
|
||||
for i, c := range cases {
|
||||
|
||||
Reference in New Issue
Block a user