Menu

CPPCheck command line not accepting GUI Project File with Visual Studio .sln file.

C Rule
2024-08-22
2024-09-03
  • C Rule

    C Rule - 2024-08-22

    I have a GUI project set up to run against a Visual Studio solution file with a particular configuration including some defines, some "Types and Functions" libraries selected, and some files excluded. I also need to use the inline suppression feature that is only available by running the command line version using the --inline-suppr option. However, when I try to run:
    cppcheck.exe --inline-suppr --project=MyProject.cppcheck
    I get the error: "cppcheck: error: no C or C++ source files found."

    How can I do all this? Is there an option for setting inline-suppr from the GUI?

     
  • Daniel Marjamäki

    You can configure inline suppressions in the Edit -> Preferences dialog.

    However in future releases you should configure it in the project dialog instead, there will be an option for it in "Warning options" tab..

     
  • C Rule

    C Rule - 2024-08-23

    Thanks, that will help. I really appreciate that.

    What about the problem of CPPCheck command line not accepting GUI Project File with Visual Studio .sln file?

     
  • Daniel Marjamäki

    I don't know exactly why it does not work for you. But it works for me. I can check Cppcheck source code if I create a GUI project file that imports the cppcheck.sln file and use option --project=test1.cppcheck on the command line.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.