Update enry dependency to 1.7.2#731
Conversation
internal/function/language.go
Outdated
| return l | ||
| } | ||
| return "" | ||
| } |
There was a problem hiding this comment.
This is already done by enry.GetLanguage as far as I know.
enry.GetLanguage calls enry.GetLanguages (https://github.com/src-d/enry/blob/master/common.go#L121) which calls all these strategies: https://github.com/src-d/enry/blob/master/common.go#L20-L27
There was a problem hiding this comment.
ok, so I'll change it and just call GetLanguages, because so far GetLanguage doesn't check if returned string is empty.
My intention was to add support for .h (c header files) which is missed.
There was a problem hiding this comment.
There is a bug in enry: https://github.com/src-d/enry/blob/master/common.go#L139
It populates a list of candidates but returns an empty slice of languages.
|
First it needs to be fixed by enry: src-d/enry#205 |
|
enry v1.7.2 is out |
Signed-off-by: kuba-- <[email protected]> Upgrade enry to v1.7.2 Signed-off-by: kuba-- <[email protected]>
Signed-off-by: kuba-- [email protected]
This PR improves accuracy for
languagefunction. So far, we used onlyenry.GetLanguagewhat for.hfiles returns an empty string. The PR tries (4 times) to get a language by cascade of functions (GetLanguage,GetLanguageByContent,GetLanguageByFilename,GetLanguageByExtension).