Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetLanguageByContent does nothing #90

Closed
erizocosmico opened this issue Aug 7, 2017 · 2 comments
Closed

GetLanguageByContent does nothing #90

erizocosmico opened this issue Aug 7, 2017 · 2 comments
Assignees
Labels

Comments

@erizocosmico
Copy link
Contributor

In GetLanguageByContent (https://github.com/src-d/enry/blob/master/common.go#L88) we can see the passed filename is "", but in GetLanguagesByContent (https://github.com/src-d/enry/blob/master/common.go#L382), which is called by the aforementioned function, returns always nil if the extension is not matched, which always happens because GetLanguagesByContent is explicitly passing an empty string.

We should either fix this or remove this exported function, because it does nothing.

@abeaumont abeaumont added the bug label Aug 7, 2017
@abeaumont
Copy link
Contributor

Thanks for reporting @erizocosmico.

@abeaumont abeaumont self-assigned this Aug 7, 2017
@abeaumont
Copy link
Contributor

It doesn't make sense for this function to not have a filename parameter (even the README.md has an example where the parameter is there). I'll add that parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants