I can't reproduce. cppcheck-gui (built from commit
6a19313 with Qt 5.15.2) handles paths with spaces without any errors on my Linux machine.
cppcheck-guistartsQProcess with the required command that can contains file path with spaces as arguments. Under the hood, on Windows, Qt processes arguments to add quotes to each one that contains space symbols.
So, I believe, all should work as expected. However, I don't have a Windows machine for the tests yet.
Last edit: Georgiy Komarov 2021-06-04
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I didn't create a project file. I was directly trying to analyse the C file. After I added created the project file and edited the addons tab, I'm able to see the misra warnings.
Thank you very much for your support.
👍
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The MISRA addon doesn't support Amedment1 additional security rules.
But Cppcheck already has checks for some of the rules described in this document (see orbitcowboy's comment on your question on github).
So, answering your question, to support additional rules, they need to be implemented in MISRA addon. But you can find some violations using Cppcheck itself.
I'm just wondering, why do you need them for? As far as I know, if you want to certify your software (for example, for SIL compatibility), it is sufficient to use a set of rules from the MISRA document itself without any additions.
Last edit: Georgiy Komarov 2021-06-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For information, I can't promise anything but I do believe cppcheck and its addon will handle all MISRA C 2012 rules later this year, including the extra amendment rules.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Change the Misra path to not have spaces in it. It doesn't work with spaces.
I can't reproduce. cppcheck-gui (built from commit
6a19313 with Qt 5.15.2) handles paths with spaces without any errors on my Linux machine.
cppcheck-gui starts
QProcess
with the required command that can contains file path with spaces as arguments. Under the hood, on Windows, Qt processes arguments to add quotes to each one that contains space symbols.So, I believe, all should work as expected. However, I don't have a Windows machine for the tests yet.
Last edit: Georgiy Komarov 2021-06-04
Am I missing anything in settings or the path.
should the directory don't have any spaces - like program Files has space in the name ?
C:/CppCheck/addons/MisraRules.txt - I'm using this path without spaces now. Still no luck :(
Should I have any compiler installed ?
int main()
{
char a[10];
a[10] = 0;
return 0;
}
I have just stored these lines of code with C extension and running to find the misra errors.
Thank you very much for your support.
Does cppcheck-gui runs the checks at all? Do you see any messages in Analysis log tab?
Have you tried to check the source file containing MISRA violations?
For example, this one:
No, you don't need any compiler installed to run cppcheck.
Last edit: Georgiy Komarov 2021-06-04
Kindly see the pic in the attachment
On Fri, Jun 4, 2021 at 10:28 AM Georgiy Komarov
jubnzv@users.sourceforge.net wrote:
--
Regards
Shobana
All the check is enabled. I have tried the same code snippet. Kindly check the attachment.
Hmm, strange.
Do you have the MISRA addon enabled? You can check this on File -> Edit Project File... -> Addons tab.
Hi ,
I didn't create a project file. I was directly trying to analyse the C file. After I added created the project file and edited the addons tab, I'm able to see the misra warnings.
Thank you very much for your support.
how to support MISRA C 2012 Amendment1 additional security?
The MISRA addon doesn't support Amedment1 additional security rules.
But Cppcheck already has checks for some of the rules described in this document (see orbitcowboy's comment on your question on github).
So, answering your question, to support additional rules, they need to be implemented in MISRA addon. But you can find some violations using Cppcheck itself.
I'm just wondering, why do you need them for? As far as I know, if you want to certify your software (for example, for SIL compatibility), it is sufficient to use a set of rules from the MISRA document itself without any additions.
Last edit: Georgiy Komarov 2021-06-07
For information, I can't promise anything but I do believe cppcheck and its addon will handle all MISRA C 2012 rules later this year, including the extra amendment rules.