I was using Cppcheck within my editor (neovim) within my projects building with cross compile builds. I therefore setup compile_commands.json files (I am also using for clangd) and using this with Cppcheck. That way I got the analysis results within the editor.
This feature is broken, after the last update I get an error message that --project does not work with single files.
This used to work and now it doesn't anymore. That way I cannot use Cppcheck anymore within my editor, so I ditched the usage of Cppcheck completely.
Will there be a fix to this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It seems there is no documentation on how to set up Cppcheck in neovim. Could you please provide some details on that?
This was changed because if --project and files were specified at the same time one of them would have been omitted. IIRC based on the options this might not have been consistent either.
I will show the configuration I used in neovim. I am using nvim-lint through lazy. nvim-lint comes with predefined settings for Cppcheck, I remember having issues with why I modified those a little.
The above settings might even not be necessary at all but I remember that the default settings for the template uses column which I cannot find in the cppcheck man page. I guess I defined the pattern that way because of the fact that cppcheck does (did) not support that but I might be wrong on that.
It was not reporting the column but nevertheless it allowed me to quickly identify issues and using the trouble plugin I was able to jump to the line directly.
Sadly I had to disable it because --project doesn't work anymore - when using cross compilation without telling Cppcheck where to find includes etc. I get tons of false positives and errors.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was using Cppcheck within my editor (neovim) within my projects building with cross compile builds. I therefore setup compile_commands.json files (I am also using for clangd) and using this with Cppcheck. That way I got the analysis results within the editor.
This feature is broken, after the last update I get an error message that --project does not work with single files.
This used to work and now it doesn't anymore. That way I cannot use Cppcheck anymore within my editor, so I ditched the usage of Cppcheck completely.
Will there be a fix to this?
It seems there is no documentation on how to set up Cppcheck in neovim. Could you please provide some details on that?
This was changed because if
--project
and files were specified at the same time one of them would have been omitted. IIRC based on the options this might not have been consistent either.You can see some more comments on how fixing this is not that straight forward here: https://github.com/danmar/cppcheck/pull/6456#issuecomment-2135337081.
I will show the configuration I used in neovim. I am using nvim-lint through lazy.
nvim-lint
comes with predefined settings for Cppcheck, I remember having issues with why I modified those a little.The above settings might even not be necessary at all but I remember that the default settings for the template uses
column
which I cannot find in the cppcheck man page. I guess I defined the pattern that way because of the fact that cppcheck does (did) not support that but I might be wrong on that.It was not reporting the column but nevertheless it allowed me to quickly identify issues and using the trouble plugin I was able to jump to the line directly.
Sadly I had to disable it because
--project
doesn't work anymore - when using cross compilation without telling Cppcheck where to find includes etc. I get tons of false positives and errors.