danmar/cppcheck — comment on commit de4a64332efa1cd4e662c4c03057228381f06615
File:  line 0
By kimmov:

This is a bad move! Another short-sightened ad-hoc refactoring without thinking about clients (other than the CLI of course).

Why do you think it is core's task to determine what filename extensions we can check as users? Earlier it was that client determined the files and core checked them. Now it is possible to get into a weird situation that clients want to check but core doesn't. It should not matter for the core a bit if somebody wants to check .code file as as a C file.

The bottom line is it sucks to compare filename extensions at the core. Especially when you don't have any way to override these assumptions and hard-coded lists.

Why core cares a bit about the fiename extension? It should be happy to get a filename to check. If the filetype needs to be determined, then it is again client's task. Simply add a filetype enum given with the filename.