I have a project file with a builddir. which is run both with gui and cli on a CI server.
The project dir does not exist when starting cppcheck.
In 2.16 the gui asked to create it and the cli just ignored it( or created it?)
in 2.17 the gui still asks but the cli reports an error:
cppcheck: error: Directory 'c:\cppcheck-build-dir' specified by --cppcheck-build-dir argument has to be existent.
When running cli on a CI server i dont need a build dir. but when running the gui on a developer pc i want a builddir.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The error from the CLI was previously only produced during the handling of the --cppcheck-build-dir option. In https://github.com/danmar/cppcheck/pull/6942 this logic was moved to be done unconditionally after all the option have been processed.
I assume you are running the GUI and CLI from the same project file which contains a configured project path. Using --no-cppcheck-build-dir you can override the one from the project. You need to specify it after the --project argument.
Hi
I have a project file with a builddir. which is run both with gui and cli on a CI server.
The project dir does not exist when starting cppcheck.
In 2.16 the gui asked to create it and the cli just ignored it( or created it?)
in 2.17 the gui still asks but the cli reports an error:
cppcheck: error: Directory 'c:\cppcheck-build-dir' specified by --cppcheck-build-dir argument has to be existent.
When running cli on a CI server i dont need a build dir. but when running the gui on a developer pc i want a builddir.
The error from the CLI was previously only produced during the handling of the
--cppcheck-build-dir
option. In https://github.com/danmar/cppcheck/pull/6942 this logic was moved to be done unconditionally after all the option have been processed.I assume you are running the GUI and CLI from the same project file which contains a configured project path. Using
--no-cppcheck-build-dir
you can override the one from the project. You need to specify it after the--project
argument.FYI The GUI settings handling is different from the CLI one which is causing inconsistencies and issues, as well as breaking the left-to-right processing order. https://trac.cppcheck.net/ticket/13623 is about rectifying his and https://github.com/danmar/cppcheck/pull/7293 is a WIP PR.
Thanks
It works now.