Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cppcheck plugin (MISRA) #41

Open
antoniomolram opened this issue Jan 8, 2021 · 3 comments
Open

cppcheck plugin (MISRA) #41

antoniomolram opened this issue Jan 8, 2021 · 3 comments

Comments

@antoniomolram
Copy link

Hi,

first of all I wanted to thank your great work!

I saw on the cppcheck documentation that exist a way to configure cppcheck to check according to some C Standard via cppcheck plugins.

http://cppcheck.sourceforge.net/manual.pdf
Chapter 10
http://cppcheck.sourceforge.net/misra.php

What do you think about the integration into your codeclimate-cppcheck repo?

Regards,
Antonio

@antoniomolram antoniomolram changed the title cppcheck plugin (MISRA cppcheck plugin (MISRA) Jan 8, 2021
@antiagainst
Copy link
Owner

Hi @antoniomolram, thanks for suggestion. I myself won't have the bandwidth for it though. Please feel free to send pull requests! :)

@lizalc
Copy link

lizalc commented Aug 20, 2021

I've been experimenting with this lately. Adding support for addons (like MISRA) is pretty straightforward but it doesn't work due to Code Climate mounting the code directory as read only when running codeclimate-cppcheck. The read only flag is hardcoded here and I don't see any way to override it.

This can be worked around though by running cppcheck --dump against all of the source before running codeclimate-cppcheck. This will generate the *.dump files needed by cppcheck when running the MISRA plugin. These *.dump files will need to be included with the source code when performing the actual analysis with codeclimate-cppcheck.

@alexdelifer
Copy link
Collaborator

So I've been investigating this, it seems like when we run codeclimate it mounts the /code volume as :ro readonly, this means that there's no straightforward way to just write to the src code folder during execution, probably as a security measure. I tested both --dump and --addon, same deal.

I'll take another look some time, but for now it seems like this is broken and not possible.

@alexdelifer alexdelifer removed their assignment Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants