1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 18:06:14 +03:00

Make languageForFilePath work for .php files.

As reported in #330, we're currently dying in `languageForFilePath`
because `lingo` is giving us back Hack when we expect PHP. This is a
pretty bad bug, so here's a temporary workaround for the issue. Once
https://github.com/tclem/lingo-haskell/issues/3 is fixed, we can
remove this workaround.

Fixes #330.
This commit is contained in:
Patrick Thomson 2019-10-11 12:14:37 -04:00
parent 4a2f331ba0
commit 78d7ba126b

View File

@ -129,6 +129,7 @@ textToLanguage :: T.Text -> Language
textToLanguage = \case
"Go" -> Go
"Haskell" -> Haskell
"Hack" -> PHP -- working around https://github.com/github/semantic/issues/330
"Java" -> Java
"JavaScript" -> JavaScript
"JSON" -> JSON