Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

how to use cppcheck in c::b

(1/3) > >>

blueshake:
maybe it is a stupid question.but I really don't know how to use it. :shock:


can anyone help me??Thanks.

I only get these result.

--- Quote ---cppcheck --version
Cppcheck 1.40
cppcheck --verbose --all --style --xml "main.cpp"
Checking main.cpp...
<?xml version="1.0"?>
<results>
</results>
--- End quote ---

blueshake:
Ok,I use cppcheck to check CppCheck.cpp project.and it got two results.



--- Quote ---CppCheck.h|31|memleak : possible error : Memory leak: CppCheck::m_CppCheckLog|
CppCheck.h|32|memleak : possible error : Memory leak: CppCheck::m_ListLog|

--- End quote ---



--- Quote ---CppCheck::CppCheck()
{
    if (!Manager::LoadResource(_T("CppCheck.zip")))
    {
        NotifyMissingFile(_T("CppCheck.zip"));
    }
    m_LogPageIndex = 0; // good init value ???
    m_CppCheckLog = 0;
    m_ListLog = 0;
    m_ListLogPageIndex = 0;
    m_CppCheckApp = _T("cppcheck");
} // end of constructor
--- End quote ---

and here I suggest use m_LogPageIndex = NULL;
m_CppCheckLog = NULL;


blueshake:
and when I use it to check c::b.

it get such result.what is the problem???

--- Quote ---cppcheck --version
Cppcheck 1.40
cppcheck --verbose --all --style --xml "base\tinyxml\tinystr.cpp" "base\tinyxml\tinywxuni.cpp" "base\tinyxml\tinyxml.cpp" "base\tinyxml\tinyxmlerror.cpp" "base\tinyxml\tinyxmlparser.cpp" "build_tools\autorevision\autorevision.cpp" "include\annoyingdialog.h" "include\autodetectcompilers.h" "include\backgroundthread.h" "include\base64.h" "include\blockallocated.h" "include\cbauibook.h" "include\cbeditor.h" "include\cbeditorprintout.h" "include\cbexception.h" "include\cbfunctor.h" "include\cbplugin.h" "include\cbproject.h" "include\cbstyledtextctrl.h" "include\cbthreadedtask.h" "include\cbthreadpool.h" "include\cbthreadpool_extras.h" "include\cbtool.h" "include\cbworkspace.h" "include\compileoptionsbase.h" "include\compiler.h" "include\compilercommandgenerator.h"
[......]

--- End quote ---

Jenna:

--- Quote from: blueshake on February 19, 2010, 08:41:01 am ---and when I use it to check c::b.

it get such result.what is the problem???

--- Quote ---cppcheck --version
Cppcheck 1.40
cppcheck --verbose --all --style --xml "base\tinyxml\tinystr.cpp" "base\tinyxml\tinywxuni.cpp" "base\tinyxml\tinyxml.cpp" "base\tinyxml\tinyxmlerror.cpp" "base\tinyxml\tinyxmlparser.cpp" "build_tools\autorevision\autorevision.cpp" "include\annoyingdialog.h" "include\autodetectcompilers.h" "include\backgroundthread.h" "include\base64.h" "include\blockallocated.h" "include\cbauibook.h" "include\cbeditor.h" "include\cbeditorprintout.h" "include\cbexception.h" "include\cbfunctor.h" "include\cbplugin.h" "include\cbproject.h" "include\cbstyledtextctrl.h" "include\cbthreadedtask.h" "include\cbthreadpool.h" "include\cbthreadpool_extras.h" "include\cbtool.h" "include\cbworkspace.h" "include\compileoptionsbase.h" "include\compiler.h" "include\compilercommandgenerator.h"
[......]

--- End quote ---


--- End quote ---

C::B project contains very much files and therfore creates a commandline, that's much too long.

The actual version of cppcheck can not handle it.

Jenna:

--- Quote from: jens on February 19, 2010, 09:26:34 am ---The actual version of cppcheck can not handle it.

--- End quote ---

More exactly, it's the OS, that can not handle the long commandline, but it's cppcheck that does not provide another mechanism (like reading the list from a file) at the moment.

Navigation

[0] Message Index

[#] Next page

Go to full version