manual.md: Add a 'Getting started' chapter

This commit is contained in:
Daniel Marjamäki 2019-03-02 14:33:14 +01:00
parent 8a3b73ffdb
commit 5e85a3df6c
1 changed files with 31 additions and 1 deletions

View File

@ -19,4 +19,34 @@ many bugs that it doesn't detect.
You will find more bugs in your software by testing your software carefully, than by using Cppcheck. You will find You will find more bugs in your software by testing your software carefully, than by using Cppcheck. You will find
more bugs in your software by instrumenting your software, than by using Cppcheck. But Cppcheck can still detect some more bugs in your software by instrumenting your software, than by using Cppcheck. But Cppcheck can still detect some
of the bugs that you miss when testing and instrumenting your software. of the bugs that you miss when testing and instrumenting your software.
## Getting started
### GUI
It is not required but creating a new project file is a good first step. There are a few options you can tweak to get
good results.
In the project settings dialog, the first option is "Import project". It is recommended that you use this feature if
you can. Cppcheck can import:
- Visual studio solution / project
- Compile database (can be generated for instance by cmake)
- Borland C++ Builder 6
When you have filled out the project settings and click on OK; the Cppcheck analysis will start.
### Command line
A good first command to try is either...
If you have a Visual studio solution / compile database (cmake/qbs/etc) / C++ Builder 6 project:
cppcheck --enable=warning --project=<path of solution / project / compile database>
Or:
cppcheck --enable=warning <folder where your source code is>
You can extend and adjust the analysis in many ways later.