File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ import (
1616)
1717
1818var unsupportedByLinguistAliasMap = map [string ]string {
19+ // Extensions for the Apex programming language
20+ // See https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dev_guide.htm
21+ "apex" : "Apex" ,
1922 // Pkl Configuration Language (https://pkl-lang.org/)
2023 // Add to linguist on 6/7/24
2124 // can remove once go-enry package updates
@@ -26,6 +29,11 @@ var unsupportedByLinguistAliasMap = map[string]string{
2629}
2730
2831var unsupportedByLinguistExtensionToNameMap = map [string ]string {
32+ ".apex" : "Apex" ,
33+ ".apxt" : "Apex" ,
34+ ".apxc" : "Apex" ,
35+ ".cls" : "Apex" ,
36+ ".trigger" : "Apex" ,
2937 // Pkl Configuration Language (https://pkl-lang.org/)
3038 ".pkl" : "Pkl" ,
3139 // Magik Language
Original file line number Diff line number Diff line change @@ -39,6 +39,12 @@ func TestGetLanguageByAlias(t *testing.T) {
3939 want : "Magik" ,
4040 wantOk : true ,
4141 },
42+ {
43+ name : "apex example unsupported by linguist alias" ,
44+ alias : "apex" ,
45+ want : "Apex" ,
46+ wantOk : true ,
47+ },
4248 }
4349
4450 for _ , tt := range tests {
@@ -77,11 +83,17 @@ func TestGetLanguage(t *testing.T) {
7783 want : "Go" ,
7884 },
7985 {
80- name : "unsupported by linguist extension" ,
86+ name : "magik: unsupported by linguist extension" ,
8187 filename : "file.magik" ,
8288 content : []byte ("" ),
8389 want : "Magik" ,
8490 },
91+ {
92+ name : "apex: unsupported by linguist extension" ,
93+ filename : "file.apxc" ,
94+ content : []byte ("" ),
95+ want : "Apex" ,
96+ },
8597 }
8698
8799 for _ , tt := range tests {
You can’t perform that action at this time.
0 commit comments