Add matlab extension#515
Add matlab extension#515da-phil wants to merge 1 commit intopre-commit:mainfrom da-phil:add_matlab_extension
Conversation
|
extensions must be unambiguous |
I don't understand. The extension dict is full of multiple associations, some extensions even have 4 associations. I thought this was the whole point of this dict, to create a mapping from a file extension to a programming language or tool. And because extensions can be used by different tools (e.g. .sh can be used by all shells) multiple mappings for the same extensions are to be expected. |
|
there may be things in the list that are ambiguous -- unfortunately mistakes were made in the last decade of this existing and we're trying to not do that moving forward |
|
In this example this would be only a problem if pre-commit would be used in a code-base were both objective-c and matlab files are present. A I don't think its a fatal design flaw if Having said that, do you think it would be possible to disambiguate further by adding some content heuristics, similarly to the shebang detection? |
|
look. I don't have time to debate you. I am telling you how it is. |
I'm using a code-base with matlab *.m files together with pre-commit, identifying matlab files would be quite helpful ;)