Open mcarmonaa opened 5 years ago
I think it makes sense to return an empty string in LANGUAGE()
when it cannot be detected. You can always add a WHERE language <> ''
if you need to filter them. What do you think @ajnavarro?
Yep, no lang detected is an empty string for enry, so we are returning that.
Edit:
We return NULL if no lang is detected by enry:
lang := enry.GetLanguage(path, blob)
if lang == "" {
return nil, nil
}
So that empty result might be a null
@carlosms is this an issue for Engine or for Gitbase?
I think it's not a bug. If anything, we could edit the query example in gitbase-web to filter out empty languages... What do you think @mcarmonaa?
I thinks is a good idea adding a filter for empty languages, it'd play also as an example/documentation for this specific case which couldn't seem obvious at a first glance.
Related to the empathy session.
Running this query:
I noticed the result returns a blank language in the second position
These are the list of repositories I'm using:
I found that using
srcd parse lang
on this file and this file return nothing.Not sure if this is a bug or not.