Is there a way add a check that variables defined with typedef enum are assigned the typedef constants in C files. C++ does this but there is not such check under C (it is allowed). C++ is not (and never will be) an option for me.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there a way add a check that variables defined with typedef enum are assigned the typedef constants in C files. C++ does this but there is not such check under C (it is allowed). C++ is not (and never will be) an option for me.
As far as I understand you would like something like:
I tried to add such check a while ago (enumMismatch). But unfortunately it turned out it generated too much noise and we removed it.
Reimplementing it as an addon would be possible. If somebody does that I would be happy to add it.