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

The lib indirectly tells what files the CLI should check because the CLI uses isC and isCPP to determine if a file should be checked or not. But the CLI is not forced to use isC and isCPP. There was no change in behaviour or interface, I just removed some code duplication.

> So add the language as one setting in Settings class.

Why can't this setting be "default" by default. If it is "default" the lib will determine it based on some assumptions. If a client still wants to set the language manually because of user/ini file/etc it is allowed to do so.

> I don't like the idea because it complicates the usage and it introduces copy/pasted code etc. So.. do you have better ideas?

If you _force_ clients to specify the language for each file then you complicate the usage. I think most settings should be optional.

If we move out the code for determining the language from the lib to every client then we will have copy/pasted code. Sooner or later it will lead to inconsistent behaviour.