Open maxpv opened 5 years ago
Hi @maxpv this is the desired output at the current state due to the fact the enry works the same way as https://github.com/github/linguist#how-linguist-works
Basically you either need to specifically call a library API that would always check the content for possible (ambiguous) list of matching languages (e.g GetLanguageByClassifier or GetLanguageByContent
that do not depend on file extension), otherwise if used though a high-level API - the first unambiguous strategy will be used, as it is done by CLI which in this case was a file extension.
I'll push a bit of the doc update on use cases, to make more clear soon.
Updated docs available at https://github.com/go-enry/go-enry#use-cases
After noticing that
enry
commands ignore files without extension, I Wrote a simple PHP file:Created files with the same content but different extensions:
enry --breakdown
returns:Don't know if that's the desired output.