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

Macros don't seem to be supported in plugin (e.g. for use with option --suppressions-list ) #40

Open
dandn opened this issue Sep 23, 2020 · 2 comments

Comments

@dandn
Copy link

dandn commented Sep 23, 2020

Environment

  • Operating System (e.g. Ubuntu 16.04 x64): MS Windows 10 Pro (Version 10.0.18363 Build 18363)
  • IDE Version (e.g. CLion 2016.3.2): CLion 2019.3.4
  • Cppcheck executable version (cppcheck --version): 2.1
  • Cppcheck plugin version: 1.4.2
  • Exact strings used in cppcheck plugin options:
    • cppcheck path: C:\Program Files\Cppcheck\cppcheck.exe
    • cppcheck options: --enable=warning,performance,portability,style --language=c++ --suppressions-list=$ProjectFileDir$\.cppcheck-suppressions

Expected behaviour

It would be nice if we could have a suppressions-list per project, e.g. using $ProjectFileDir$ as shown above.

Actual behaviour

Only a single suppressions-file seems to be supported currently. We need to point to this file with an absolute file path.

Attempting to use macro $ProjectFileDir$ as shown above results in the following to appear in an error dialog:
ExecutionException: Cppcheck Error : Exit Code - 1 : "C:\Program Files\Cppcheck\cppcheck.exe" "--template=[{file}:{line}]: ({severity}) {id}: {message}" -IC:/Projects/src/work/<redacted>/src --enable=warning,performance,portability,style --language=c++ --suppressions-list=$ProjectFileDir$\.cppcheck-suppressions C:\Users\DANIEL~1\AppData\Local\Temp___xxxxx_processing_client.cc

Steps to reproduce the behaviour

Just configure the cppcheck options as shown above.

Any suggestions? Is there a workaround for this issue that would allow us to set up a suppressions file per project?

@johnthagen
Copy link
Owner

Yes, unfortunately the IntelliJ macros are not currently supported, but a PR adding support would be accepted.

@firewave Is a recent contributor who might know more about what this might take.

@firewave
Copy link
Collaborator

firewave commented Nov 2, 2020

@firewave Is a recent contributor who might know more about what this might take.

Err, no.

But definitely something to look into while getting more familiar with the SDK and stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants