sort detected languages properly
Created by: beyang
Sort detected languages properly even if USE_ENHANCED_LANGUAGE_DETECTION=false
Potentially fixes https://github.com/sourcegraph/sourcegraph/issues/11466
I'm not sure if this fix is good, because I'm unsure of the cost of invoking FileInfo.Size()
for Go. Given that the customer set USE_ENHANCED_LANGUAGE_DETECTION=false
for performance reasons, I want to ensure this fix actually works on their very large Go monorepo (see the issue description for more details).