The MISRA scripts are too constrictive for checking macros names up to 32 characters only so I've created my own. The manual mentions how to call this from the command line. Is there a way to call these custom scripts from the GUI?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The addons/scripts are hardcoded in the GUI, so the code must be changed for additional scripts.
Maybe a solution would be to change the misra script so it accepts longer names when an additional parameter (for example --long-names) is added. In the GUI code an option for enabling this must be added, so it needs code changes also. But maybe more people want/need this behavior and would also profit from this enhancement.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had started to change the MISRA script. However, if I were to install an update to CPPCheck, it would overwrite the python file every time and I'd have to recopy it from somewhere else. Having a separate file for custom scripts is the better approach.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think also that it would be nice to be able to execute arbitrary extra addons from the GUI. You could for instance specify "addon path" and "args" in the project settings somewhere.
If you are interested to fix that then please feel free to look into it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The MISRA scripts are too constrictive for checking macros names up to 32 characters only so I've created my own. The manual mentions how to call this from the command line. Is there a way to call these custom scripts from the GUI?
The addons/scripts are hardcoded in the GUI, so the code must be changed for additional scripts.
Maybe a solution would be to change the misra script so it accepts longer names when an additional parameter (for example
--long-names
) is added. In the GUI code an option for enabling this must be added, so it needs code changes also. But maybe more people want/need this behavior and would also profit from this enhancement.I had started to change the MISRA script. However, if I were to install an update to CPPCheck, it would overwrite the python file every time and I'd have to recopy it from somewhere else. Having a separate file for custom scripts is the better approach.
Why don't you just disable those warnings?
I think it's normal and sane to explicitly disable some of the MISRA rules.
I did. I just wanted to enable a more cutom one than that.
I think also that it would be nice to be able to execute arbitrary extra addons from the GUI. You could for instance specify "addon path" and "args" in the project settings somewhere.
If you are interested to fix that then please feel free to look into it.
That's what I was thinking. Unfortunately, coding is not my area of expertise.