diff --git a/gui/help/ch01.html b/gui/help/ch01.html deleted file mode 100644 index 76ab08bb7..000000000 --- a/gui/help/ch01.html +++ /dev/null @@ -1,13 +0,0 @@ -Chapter 1. Introduction

Chapter 1. Introduction

Cppcheck is an analysis tool for C/C++ code. Unlike C/C++ compilers - and many other analysis tools, it doesn't detect syntax errors. Cppcheck - only detects the types of bugs that the compilers normally fail to detect. - The goal is no false positives.

Supported code and platforms:

Accuracy

Please understand that there are limits of Cppcheck. Cppcheck is - rarely wrong about reported errors. But there are 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 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.

diff --git a/gui/help/ch02.html b/gui/help/ch02.html deleted file mode 100644 index ecb151862..000000000 --- a/gui/help/ch02.html +++ /dev/null @@ -1,8 +0,0 @@ -Chapter 2. Getting started

Chapter 2. Getting started

Table of Contents

First test
Checking all files in a folder
Excluding a file or folder from checking
Stylistic issues
Saving results in file
Unused functions
Enable all checks
Multithreaded checking

First test

Here is a simple code

int main()
-{
-    char a[10];
-    a[10] = 0;
-    return 0;
-}

If you save that into file1.c and - execute:

cppcheck file1.c

The output from cppcheck will then be:

Checking file1.c...
-[file1.c:4]: (error) Array 'a[10]' index 10 out of bounds
diff --git a/gui/help/ch02s02.html b/gui/help/ch02s02.html deleted file mode 100644 index f2094022f..000000000 --- a/gui/help/ch02s02.html +++ /dev/null @@ -1,6 +0,0 @@ -Checking all files in a folder

Checking all files in a folder

Normally a program has many sourcefiles. And you want to check - them all. Cppcheck can check all sourcefiles in a directory:

cppcheck path

If "path" is a folder then cppcheck will check all sourcefiles in - this folder.

Checking path/file1.cpp...
-1/2 files checked 50% done
-Checking path/file2.cpp...
-2/2 files checked 100% done
diff --git a/gui/help/ch02s03.html b/gui/help/ch02s03.html deleted file mode 100644 index a7e957a7d..000000000 --- a/gui/help/ch02s03.html +++ /dev/null @@ -1,5 +0,0 @@ -Excluding a file or folder from checking

Excluding a file or folder from checking

There is no command to exclude a file or folder from checking. But - you can exclude a file or folder by being more careful when including - files and folders in the checking.

Imagine for example that the folder "src" contain the folders "a", - "b" and "c". To exclude "c" this command can be used:

cppcheck src/a src/b

All files under "src/a" and "src/b" are then checked.

The flag --file-list might also be - useful.

diff --git a/gui/help/ch02s04.html b/gui/help/ch02s04.html deleted file mode 100644 index 8b0fdecfe..000000000 --- a/gui/help/ch02s04.html +++ /dev/null @@ -1,9 +0,0 @@ -Stylistic issues

Stylistic issues

By default Cppcheck will only check for bugs. There are also a few - checks for stylistic issues.

Here is a simple code example:

void f(int x)
-{
-    int i;
-    if (x == 0)
-    {
-        i = 0;
-    }
-}

To enable stylistic checks, use the --style flag:

cppcheck --enable=style file1.c

The reported error is:

[file3.c:3]: (style) The scope of the variable i can be limited
diff --git a/gui/help/ch02s05.html b/gui/help/ch02s05.html deleted file mode 100644 index d5ad68399..000000000 --- a/gui/help/ch02s05.html +++ /dev/null @@ -1,3 +0,0 @@ -Saving results in file

Saving results in file

Many times you will want to save the results in a file. You can - use the normal shell redirection for piping error output to a - file.

cppcheck file1.c 2> err.txt
diff --git a/gui/help/ch02s06.html b/gui/help/ch02s06.html deleted file mode 100644 index 14a5e9cc9..000000000 --- a/gui/help/ch02s06.html +++ /dev/null @@ -1,3 +0,0 @@ -Unused functions

Unused functions

This check will try to find unused functions. It is best to use - this when the whole program is checked, so that all usages is seen by - cppcheck.

cppcheck --enable=unusedFunctions path
diff --git a/gui/help/ch02s07.html b/gui/help/ch02s07.html deleted file mode 100644 index dbdf4b318..000000000 --- a/gui/help/ch02s07.html +++ /dev/null @@ -1,2 +0,0 @@ -Enable all checks

Enable all checks

To enable all checks your can use the - --enable=all flag:

cppcheck --enable=all path
diff --git a/gui/help/ch02s08.html b/gui/help/ch02s08.html deleted file mode 100644 index 7575eadca..000000000 --- a/gui/help/ch02s08.html +++ /dev/null @@ -1 +0,0 @@ -Multithreaded checking

Multithreaded checking

To use 4 threads to check the files in a folder:

cppcheck -j 4 path
diff --git a/gui/help/ch03.html b/gui/help/ch03.html deleted file mode 100644 index 5ef94c283..000000000 --- a/gui/help/ch03.html +++ /dev/null @@ -1,16 +0,0 @@ -Chapter 3. Preprocessor configurations

Chapter 3. Preprocessor configurations

By default Cppcheck will check all preprocessor configurations - (except those that has #error in them). This is the recommended - behaviour.

But if you want to manually limit the checking you can do so with - -D.

Beware that only the macros, which are given here and the macros - defined in source files and known header files are considered. That - excludes all the macros defined in some system header files, which are by - default not examined by cppcheck.

The usage: if you, for example, want to limit the checking so the - only configuration to check should be "DEBUG=1;__cplusplus" then something - like this can be used:

cppcheck -DDEBUG=1 -D__cplusplus path

An alternative for -D is to use #error.

#if LIB_VERSION <= 3
-#error "lib version must be greater than 3"
-#endif

Using #error instead of -D have some advantages:

diff --git a/gui/help/ch04.html b/gui/help/ch04.html deleted file mode 100644 index a4155c408..000000000 --- a/gui/help/ch04.html +++ /dev/null @@ -1,5 +0,0 @@ -Chapter 4. XML output

Chapter 4. XML output

Cppcheck can generate the output in XML format.

Use the --xml flag when you execute cppcheck:

cppcheck --xml file1.cpp

The xml format is:

<?xml version="1.0"?>
-<results>
-  <error file="file1.cpp" line="123" id="someError" 
-               severity="error" msg="some error text"/>
-</results>

Attributes:

file

filename. Both relative and absolute paths are possible

line

a number

id

id of error. These are always valid symbolnames.

severity

either error or style

msg

the error message

diff --git a/gui/help/ch05.html b/gui/help/ch05.html deleted file mode 100644 index 77a14c4bb..000000000 --- a/gui/help/ch05.html +++ /dev/null @@ -1,10 +0,0 @@ -Chapter 5. Reformatting the output

Chapter 5. Reformatting the output

If you want to reformat the output so it looks different you can use - templates.

To get Visual Studio compatible output you can use "--template - vs":

cppcheck --template vs gui/test.cpp

This output will look like this:

Checking gui/test.cpp...
-gui/test.cpp(31): error: Memory leak: b
-gui/test.cpp(16): error: Mismatching allocation and deallocation: k

To get gcc compatible output you can use "--template gcc":

cppcheck --template gcc gui/test.cpp

The output will look like this:

Checking gui/test.cpp...
-gui/test.cpp:31: error: Memory leak: b
-gui/test.cpp:16: error: Mismatching allocation and deallocation: k

You can write your own pattern (for example a comma-separated - format):

cppcheck --template "{file},{line},{severity},{id},{message}" gui/test.cpp

The output will look like this:

Checking gui/test.cpp...
-gui/test.cpp,31,error,memleak,Memory leak: b
-gui/test.cpp,16,error,mismatchAllocDealloc,Mismatching allocation and deallocation: k

diff --git a/gui/help/ch06.html b/gui/help/ch06.html deleted file mode 100644 index 46b8c5793..000000000 --- a/gui/help/ch06.html +++ /dev/null @@ -1,9 +0,0 @@ -Chapter 6. Suppressions

Chapter 6. Suppressions

If you want to filter out certain errors you can suppress these. - First you need to create a suppressions file. The format is:

[error id]:[filename]:[line]
-[error id]:[filename2]
-[error id]

The error id is the id that you want to suppress. - The easiest way to get it is to use the --xml command - line flag. Copy and paste the id string from the xml - output.

Here is an example:

memleak:file1.cpp
-exceptNew:file1.cpp
-uninitvar

You can then use the suppressions file:

cppcheck --suppressions suppressions.txt src/

diff --git a/gui/help/ch07.html b/gui/help/ch07.html deleted file mode 100644 index f2f94bf9c..000000000 --- a/gui/help/ch07.html +++ /dev/null @@ -1,22 +0,0 @@ -Chapter 7. Leaks

Chapter 7. Leaks

Table of Contents

Userdefined allocation/deallocation functions

Looking for memory leaks and resource leaks is a key feature of - Cppcheck. Cppcheck can detect many common mistakes by default. But through - some tweaking you can improve the checking.

Userdefined allocation/deallocation functions

Cppcheck understands many common allocation and - deallocation functions. But not all.

Here is example code that might leak memory or resources:

void foo(int x)
-{
-    void *f = CreateFred();
-    if (x == 1)
-        return;
-    DestroyFred(f);
-}

If you analyse that with Cppcheck it won't find any leaks:

cppcheck --enable=possibleError fred1.cpp

You can add some custom leaks checking by providing simple - implementations for the allocation and deallocation functions. Write - this in a separate file:

void *CreateFred()
-{
-    return malloc(100);
-}
-
-void DestroyFred(void *p)
-{
-    free(p);
-}

When Cppcheck see this it understands that CreateFred will return - allocated memory and that DestroyFred will deallocate memory.

Now, execute Cppcheck this way:

cppcheck --append=fred.cpp fred1.cpp

The output from cppcheck is:

Checking fred1.cpp...
-[fred1.cpp:5]: (error) Memory leak: f
diff --git a/gui/help/ch08.html b/gui/help/ch08.html deleted file mode 100644 index ab1427197..000000000 --- a/gui/help/ch08.html +++ /dev/null @@ -1,16 +0,0 @@ -Chapter 8. Exception safety

Chapter 8. Exception safety

Cppcheck has a few checks that ensure that you don't break the basic - guarantee of exception safety. It doesn't have any checks for the strong - guarantee yet.

Example:

Fred::Fred() : a(new int[20]), b(new int[20])
-{
-}

By default cppcheck will not detect any problems in that - code.

To enable the exception safety checking you can use - --enable:

cppcheck --enable=exceptNew --enable=exceptRealloc fred.cpp

The output will be:

[fred.cpp:3]: (style) Upon exception there is memory leak: a

If an exception occurs when b is allocated, - a will leak.

Here is another example:

int *p;
-
-int a(int sz)
-{
-    delete [] p;
-    if (sz <= 0)
-        throw std::runtime_error("size <= 0");
-    p = new int[sz];
-}

Check that with Cppcheck:

cppcheck --enable=exceptNew --enable=exceptRealloc except2.cpp

The output from Cppcheck is:

[except2.cpp:7]: (error) Throwing exception in invalid state, p points at deallocated memory
diff --git a/gui/help/ch09.html b/gui/help/ch09.html deleted file mode 100644 index 66214ee4c..000000000 --- a/gui/help/ch09.html +++ /dev/null @@ -1,15 +0,0 @@ -Chapter 9. html report

Chapter 9. html report

You can convert the xml output from cppcheck into a html report. - You'll need python and the pygments module - (http://pygments.org/) for this to work. In the Cppcheck source - tree there is a folder "htmlreport" that contains a script that transforms - a Cppcheck xml file into html output.

This command generates the help screen:

htmlreport/cppcheck-htmlreport -h

The output screen says:

Usage: cppcheck-htmlreport [options]
-
-Options:
-  -h, --help      show this help message and exit 
-  --file=FILE     The cppcheck xml output file to read defects from. 
-                  Default is reading from stdin. 
-  --report-dir=REPORT_DIR 
-                  The directory where the html report content is written.
-  --source-dir=SOURCE_DIR
-                  Base directory where source code files can be found.

An example usage:

./cppcheck gui/test.cpp --xml 2> err.xml
-htmlreport/cppcheck-htmlreport --file=err.xml --report-dir=test1 --source-dir=.
diff --git a/gui/help/ch10.html b/gui/help/ch10.html deleted file mode 100644 index d43b09a86..000000000 --- a/gui/help/ch10.html +++ /dev/null @@ -1,2 +0,0 @@ -Chapter 10. Graphical user interface

Chapter 10. Graphical user interface

Table of Contents

Introduction
Check source code
Inspecting results
Settings
Project files

Introduction

A Cppcheck GUI is available.

The main screen is shown immediately when the GUI is - started.

diff --git a/gui/help/ch10s02.html b/gui/help/ch10s02.html deleted file mode 100644 index cf5f5a407..000000000 --- a/gui/help/ch10s02.html +++ /dev/null @@ -1 +0,0 @@ -Check source code

Check source code

Use the Check menu.

diff --git a/gui/help/ch10s03.html b/gui/help/ch10s03.html deleted file mode 100644 index 0cc1fac82..000000000 --- a/gui/help/ch10s03.html +++ /dev/null @@ -1,4 +0,0 @@ -Inspecting results

Inspecting results

The results are shown in a list.

You can show/hide certain types of messages through the - View menu.

Results can be saved to an xml file that can later be opened. See - Save results to file and Open - XML.

diff --git a/gui/help/ch10s04.html b/gui/help/ch10s04.html deleted file mode 100644 index 8639dd343..000000000 --- a/gui/help/ch10s04.html +++ /dev/null @@ -1,3 +0,0 @@ -Settings

Settings

The language can be changed at any time by using the - Language menu.

More settings are available in - Edit>Preferences.

diff --git a/gui/help/ch10s05.html b/gui/help/ch10s05.html deleted file mode 100644 index 355af5088..000000000 --- a/gui/help/ch10s05.html +++ /dev/null @@ -1,7 +0,0 @@ -Project files

Project files

The project files are used to store project specific settings. - These settings are:

It isn't recommended to provide the paths to the standard C/C++ - headers - Cppcheck has internal knowledge about ANSI C/C++ and it isn't - recommended that this known functionality is redefined. But feel free to - try it.

As you can read in chapter 3 in this manual the default is that - Cppcheck checks all configurations. So only provide preprocessor defines - if you want to limit the checking.

diff --git a/gui/help/index.html b/gui/help/index.html deleted file mode 100644 index c48f86cc8..000000000 --- a/gui/help/index.html +++ /dev/null @@ -1 +0,0 @@ -Cppcheck 1.44

Cppcheck 1.44


Table of Contents

1. Introduction
2. Getting started
First test
Checking all files in a folder
Excluding a file or folder from checking
Stylistic issues
Saving results in file
Unused functions
Enable all checks
Multithreaded checking
3. Preprocessor configurations
4. XML output
5. Reformatting the output
6. Suppressions
7. Leaks
Userdefined allocation/deallocation functions
8. Exception safety
9. html report
10. Graphical user interface
Introduction
Check source code
Inspecting results
Settings
Project files
diff --git a/gui/help/manual.html b/gui/help/manual.html new file mode 100644 index 000000000..aac839311 --- /dev/null +++ b/gui/help/manual.html @@ -0,0 +1,1023 @@ + +Cppcheck 1.46

Cppcheck 1.46


Table of Contents
1. Introduction
2. Getting started
2.1. First test
2.2. Checking all files in a folder
2.3. Excluding a file or folder from checking
2.4. Severities
2.5. Enable messages
2.5.1. Stylistic issues
2.5.2. Unused functions
2.5.3. Enable all checks
2.6. Saving results in file
2.7. Multithreaded checking
3. Preprocessor configurations
4. XML output
5. Reformatting the output
6. Suppressions
7. Leaks
7.1. Userdefined allocation/deallocation functions
8. Exception safety
9. Html report
10. Graphical user interface
10.1. Introduction
10.2. Check source code
10.3. Inspecting results
10.4. Settings
10.5. Project files

Chapter 1. Introduction

Cppcheck is an analysis tool for C/C++ code. Unlike C/C++ compilers + and many other analysis tools, it doesn't detect syntax errors. Cppcheck + only detects the types of bugs that the compilers normally fail to detect. + The goal is no false positives.

Supported code and platforms:

Accuracy

Please understand that there are limits of Cppcheck. Cppcheck is + rarely wrong about reported errors. But there are 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 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.


Chapter 2. Getting started

2.1. First test

Here is a simple code

int main()
+{
+    char a[10];
+    a[10] = 0;
+    return 0;
+}

If you save that into file1.c and + execute:

cppcheck file1.c

The output from cppcheck will then be:

Checking file1.c...
+[file1.c:4]: (error) Array 'a[10]' index 10 out of bounds

2.2. Checking all files in a folder

Normally a program has many sourcefiles. And you want to check + them all. Cppcheck can check all sourcefiles in a directory:

cppcheck path

If "path" is a folder then cppcheck will check all sourcefiles in + this folder.

Checking path/file1.cpp...
+1/2 files checked 50% done
+Checking path/file2.cpp...
+2/2 files checked 100% done

2.3. Excluding a file or folder from checking

There is no command to exclude a file or folder from checking. But + you can exclude a file or folder by being more careful when including + files and folders in the checking.

Imagine for example that the folder "src" contain the folders "a", + "b" and "c". To exclude "c" this command can be used:

cppcheck src/a src/b

All files under "src/a" and "src/b" are then checked.

The flag --file-list might also be + useful.


2.4. Severities

The possible severities for messages are:

error

used when bugs are found

warning

suggestions about defensive programming to prevent + bugs

style

stylistic issues related to code cleanup (unused functions, + redundant code, constness, and such)

performance

suggestions for making the code faster


2.5. Enable messages

By default only error messages are shown. + Through the --enable command more checks can be + enabled.


2.5.1. Stylistic issues

With --enable=style you enable most + warning, style and + performance messages.

Here is a simple code example:

void f(int x)
+{
+    int i;
+    if (x == 0)
+    {
+        i = 0;
+    }
+}

There are no bugs in that code so Cppcheck won't report anything + by default. To enable the stylistic messages, use the --enable=style + command:

cppcheck --enable=style file3.c

The output from Cppcheck is now:

Checking file3.c...
+[file3.c:3]: (style) Variable 'i' is assigned a value that is never used
+[file3.c:3]: (style) The scope of the variable i can be reduced


2.5.2. Unused functions

This check will try to find unused functions. It is best to use + this when the whole program is checked, so that all usages is seen by + cppcheck.

cppcheck --enable=unusedFunction path

2.5.3. Enable all checks

To enable all checks your can use the + --enable=all flag:

cppcheck --enable=all path

2.6. Saving results in file

Many times you will want to save the results in a file. You can + use the normal shell redirection for piping error output to a + file.

cppcheck file1.c 2> err.txt

2.7. Multithreaded checking

To use 4 threads to check the files in a folder:

cppcheck -j 4 path

Chapter 3. Preprocessor configurations

By default Cppcheck will check all preprocessor configurations + (except those that has #error in them). This is the recommended + behaviour.

But if you want to manually limit the checking you can do so with + -D.

Beware that only the macros, which are given here and the macros + defined in source files and known header files are considered. That + excludes all the macros defined in some system header files, which are by + default not examined by cppcheck.

The usage: if you, for example, want to limit the checking so the + only configuration to check should be "DEBUG=1;__cplusplus" then something + like this can be used:

cppcheck -DDEBUG=1 -D__cplusplus path

Chapter 4. XML output

Cppcheck can generate the output in XML format.

Use the --xml flag when you execute cppcheck:

cppcheck --xml file1.cpp

The xml format is:

<?xml version="1.0"?>
+<results>
+  <error file="file1.cpp" line="123" id="someError" 
+               severity="error" msg="some error text"/>
+</results>

Attributes:

file

filename. Both relative and absolute paths are possible

line

a number

id

id of error. These are always valid symbolnames.

severity

either error or style. + warning and performance are + saved as style.

msg

the error message


Chapter 5. Reformatting the output

If you want to reformat the output so it looks different you can use + templates.

To get Visual Studio compatible output you can use "--template + vs":

cppcheck --template vs gui/test.cpp

This output will look like this:

Checking gui/test.cpp...
+gui/test.cpp(31): error: Memory leak: b
+gui/test.cpp(16): error: Mismatching allocation and deallocation: k

To get gcc compatible output you can use "--template gcc":

cppcheck --template gcc gui/test.cpp

The output will look like this:

Checking gui/test.cpp...
+gui/test.cpp:31: error: Memory leak: b
+gui/test.cpp:16: error: Mismatching allocation and deallocation: k

You can write your own pattern (for example a comma-separated + format):

cppcheck --template "{file},{line},{severity},{id},{message}" gui/test.cpp

The output will look like this:

Checking gui/test.cpp...
+gui/test.cpp,31,error,memleak,Memory leak: b
+gui/test.cpp,16,error,mismatchAllocDealloc,Mismatching allocation and deallocation: k


Chapter 6. Suppressions

If you want to filter out certain errors you can suppress these. + First you need to create a suppressions file. The format is:

[error id]:[filename]:[line]
+[error id]:[filename2]
+[error id]

The error id is the id that you want to suppress. + The easiest way to get it is to use the --xml command + line flag. Copy and paste the id string from the xml + output.

Here is an example:

memleak:file1.cpp
+exceptNew:file1.cpp
+uninitvar

You can then use the suppressions file:

cppcheck --suppressions suppressions.txt src/


Chapter 7. Leaks

Looking for memory leaks and resource leaks is a key feature of + Cppcheck. Cppcheck can detect many common mistakes by default. But through + some tweaking you can improve the checking.


7.1. Userdefined allocation/deallocation functions

Cppcheck understands many common allocation and + deallocation functions. But not all.

Here is example code that might leak memory or resources:

void foo(int x)
+{
+    void *f = CreateFred();
+    if (x == 1)
+        return;
+    DestroyFred(f);
+}

If you analyse that with Cppcheck it won't find any leaks:

cppcheck --enable=possibleError fred1.cpp

You can add some custom leaks checking by providing simple + implementations for the allocation and deallocation functions. Write + this in a separate file:

void *CreateFred()
+{
+    return malloc(100);
+}
+
+void DestroyFred(void *p)
+{
+    free(p);
+}

When Cppcheck see this it understands that CreateFred will return + allocated memory and that DestroyFred will deallocate memory.

Now, execute Cppcheck this way:

cppcheck --append=fred.cpp fred1.cpp

The output from cppcheck is:

Checking fred1.cpp...
+[fred1.cpp:5]: (error) Memory leak: f

Chapter 8. Exception safety

Cppcheck has a few checks that ensure that you don't break the basic + guarantee of exception safety. It doesn't have any checks for the strong + guarantee yet.

Example:

Fred::Fred() : a(new int[20]), b(new int[20])
+{
+}

By default cppcheck will not detect any problems in that + code.

To enable the exception safety checking you can use + --enable:

cppcheck --enable=exceptNew --enable=exceptRealloc fred.cpp

The output will be:

[fred.cpp:3]: (style) Upon exception there is memory leak: a

If an exception occurs when b is allocated, + a will leak.

Here is another example:

int *p;
+
+int a(int sz)
+{
+    delete [] p;
+    if (sz <= 0)
+        throw std::runtime_error("size <= 0");
+    p = new int[sz];
+}

Check that with Cppcheck:

cppcheck --enable=exceptNew --enable=exceptRealloc except2.cpp

The output from Cppcheck is:

[except2.cpp:7]: (error) Throwing exception in invalid state, p points at deallocated memory

Chapter 9. Html report

You can convert the xml output from cppcheck into a html report. + You'll need python and the pygments module + (http://pygments.org/) for this to work. In the Cppcheck source + tree there is a folder "htmlreport" that contains a script that transforms + a Cppcheck xml file into html output.

This command generates the help screen:

htmlreport/cppcheck-htmlreport -h

The output screen says:

Usage: cppcheck-htmlreport [options]
+
+Options:
+  -h, --help      show this help message and exit 
+  --file=FILE     The cppcheck xml output file to read defects from. 
+                  Default is reading from stdin. 
+  --report-dir=REPORT_DIR 
+                  The directory where the html report content is written.
+  --source-dir=SOURCE_DIR
+                  Base directory where source code files can be found.

An example usage:

./cppcheck gui/test.cpp --xml 2> err.xml
+htmlreport/cppcheck-htmlreport --file=err.xml --report-dir=test1 --source-dir=.

Chapter 10. Graphical user interface

10.1. Introduction

A Cppcheck GUI is available.

The main screen is shown immediately when the GUI is + started.


10.2. Check source code

Use the Check menu.


10.3. Inspecting results

The results are shown in a list.

You can show/hide certain types of messages through the + View menu.

Results can be saved to an xml file that can later be opened. See + Save results to file and Open + XML.


10.4. Settings

The language can be changed at any time by using the + Language menu.

More settings are available in + Edit>Preferences.


10.5. Project files

The project files are used to store project specific settings. + These settings are:

  • include folders

  • preprocessor defines

It isn't recommended to provide the paths to the standard C/C++ + headers - Cppcheck has internal knowledge about ANSI C/C++ and it isn't + recommended that this known functionality is redefined. But feel free to + try it.

As you can read in chapter 3 in this manual the default is that + Cppcheck checks all configurations. So only provide preprocessor defines + if you want to limit the checking.

\ No newline at end of file diff --git a/gui/help/online-help.qhp b/gui/help/online-help.qhp index 61043d72a..16ab79981 100644 --- a/gui/help/online-help.qhp +++ b/gui/help/online-help.qhp @@ -4,56 +4,11 @@ doc -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
- index.html - ch01.html - ch02.html - ch02s02.html - ch02s03.html - ch02s04.html - ch02s05.html - ch02s06.html - ch02s07.html - ch02s08.html - ch03.html - ch04.html - ch05.html - ch06.html - ch07.html - ch08.html - ch09.html - ch10.html - ch10s02.html - ch10s03.html - ch10s04.html - ch10s05.html + manual.html