About
About Cppcheck
Cppcheck
Version %1
%1
Cppcheck - A tool for static C/C++ code analysis.
Cppcheck - /++.
Copyright 2007-%1 Cppcheck team.
Copyright 2007-2021 Cppcheck team.
Copyright 2007-2021 Cppcheck team.
This program is licensed under the terms
of the GNU General Public License version 3
GNU General Public License, 3
Visit Cppcheck homepage at %1
: %1
<html><head/><body><p>Many thanks to these libraries that we use:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">PCRE</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">PicoJSON</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Qt</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">TinyXML2</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Boost</li></ul></body></html>
<html><head/><body><p>Many thanks to these libraries that we use:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">pcre</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">picojson</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">qt</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">tinyxml2</li></ul></body></html>
ApplicationDialog
Add an application
Here you can add an application that can open error files. Specify a name for the application, the application executable and command line parameters for the application.
The following texts in parameters are replaced with appropriate values when application is executed:
(file) - Filename containing the error
(line) - Line number containing the error
(message) - Error message
(severity) - Error severity
Example opening a file with Kate and make Kate scroll to the correct line:
Executable: kate
Parameters: -l(line) (file)
, . , .
:
(file) - ,
(line) -
(message) -
(severity) -
Kate ( ):
: kate
: -l(line) (file)
&Name:
&:
&Executable:
&:
&Parameters:
&:
Browse
Executable files (*.exe);;All files(*.*)
(*.exe);; (*.*)
Select viewer application
Cppcheck
Cppcheck
You must specify a name, a path and optionally parameters for the application!
!
FileViewDialog
Could not find the file: %1
Could not find the file:
: %1
Cppcheck
Cppcheck
Could not read the file: %1
: %1
HelpDialog
Cppcheck GUI help
Contents
Index
Helpfile '%1' was not found
Cppcheck
Cppcheck
LibraryAddFunctionDialog
Add function
Function name(s)
()
Number of arguments
LibraryDialog
Library Editor
Open
Save
Save as
Functions
Sort
Add
Filter:
:
Comments
noreturn
False
True
Unknown
return value must be used
ignore function in leaks checking
Arguments
Edit
Library files (*.cfg)
(*.cfg)
Open library file
Cppcheck
Cppcheck
Cannot open file %1.
Can not open file %1.
%1.
Failed to load %1. %2.
%1. %2.
Cannot save file %1.
Can not save file %1.
%1.
Save the library as
LibraryEditArgDialog
Edit argument
<html><head/><body>
<p>Is bool value allowed? For instance result from comparison or from '!' operator.</p>
<p>Typically, set this if the argument is a pointer, size, etc.</p>
<p>Example:</p>
<pre> memcmp(x, y, i == 123); // last argument should not have a bool value</pre>
</body></html>
Not bool
<html><head/><body>
<p>Is a null parameter value allowed?</p>
<p>Typically this should be used on any pointer parameter that does not allow null.</p>
<p>Example:</p>
<pre> strcpy(x,y); // neither x or y is allowed to be null.</pre>
</body></html>
Not null
Not uninit
String
Format string
Min size of buffer
Type
None
argvalue
mul
strlen
Arg
Arg2
and
Valid values
MainWindow
Cppcheck
Cppcheck
A&nalyze
Standard
&File
&
&View
&
&Toolbars
&
C++ standard
C++
&C standard
C standard
& C
&Edit
&
&License...
&...
A&uthors...
&...
&About...
& ...
&Files...
&...
Analyze files
Check files
Ctrl+F
Ctrl+F
&Directory...
&...
Analyze directory
Check directory
Ctrl+D
Ctrl+D
Ctrl+R
Ctrl+R
&Stop
Stop analysis
Stop checking
Esc
Esc
&Save results to file...
...
Ctrl+S
Ctrl+S
&Quit
&Clear results
&Preferences
Show errors
Show warnings
Show performance warnings
Show &hidden
Information
Show information messages
Show portability warnings
Show Cppcheck results
Cppcheck
Clang
Clang
Show Clang results
Clang
&Filter
Filter results
Windows 32-bit ANSI
Windows 32-bit ANSI
Windows 32-bit Unicode
Windows 32-bit Unicode
Unix 32-bit
Unix 32-bit
Unix 64-bit
Unix 64-bit
Windows 64-bit
Windows 64-bit
&Print...
...
Print the Current Report
Print Pre&view...
...
Open a Print Preview Dialog for the Current Results
Open library editor
&Check all
Checking for updates
Hide
Report
Filter
&Reanalyze modified files
&Recheck modified files
Reanal&yze all files
Ctrl+Q
Style war&nings
E&rrors
&Uncheck all
Collapse &all
&Expand all
&Standard
Standard items
Toolbar
&Categories
Error categories
&Open XML...
& XML...
Open P&roject File...
&...
Ctrl+Shift+O
Sh&ow Scratchpad...
&New Project File...
& ...
Ctrl+Shift+N
&Log View
&
Log View
C&lose Project File
&
&Edit Project File...
& ...
&Statistics
&
&Warnings
Per&formance warnings
&Information
&Portability
P&latforms
C++&11
C&99
&Posix
C&11
&C89
&C++03
&Library Editor...
&Auto-detect language
&Enforce C++
C++
E&nforce C
C
C++14
C++14
Reanalyze and check library
Check configuration (defines, includes)
(defines, includes)
C++17
C++17
C++20
C++20
Compliance report...
Normal
Autosar
EULA...
Thread Details
Show thread details
&Contents
Categories
Show style warnings
Open the help contents
F1
F1
&Help
Quick Filter:
:
Select configuration
Found project file: %1
Do you want to load this project file instead?
: %1
?
File not found
Bad XML
XML
Missing attribute
Bad attribute value
Unsupported format
Duplicate define
Failed to load the selected library '%1'.
%2
'%1'.
%2
File not found: '%1'
Failed to load/setup addon %1: %2
Failed to load %1. Your Cppcheck installation is broken. You can use --data-dir=<directory> at the command line to specify where this file is located. Please note that --data-dir is supposed to be used by installation scripts and therefore the GUI does not start when it is used, all that happens is that the setting is configured.
Analysis is aborted.
Failed to load %1 - %2
Analysis is aborted.
%1
Analysis is aborted.
License
Authors
Save the report file
XML files (*.xml)
XML- (*.xml)
There was a problem with loading the editor application settings.
This is probably because the settings were changed between the Cppcheck versions. Please check (and fix) the editor application settings, otherwise the editor program might not start correctly.
.
, . , ( ) .
You must close the project file before selecting new files or directories!
!
The library '%1' contains unknown elements:
%2
'%1' :
%2
Duplicate platform type
Platform type redefined
Unknown element
Error
Failed to load %1. Your Cppcheck installation is broken. You can use --data-dir=<directory> at the command line to specify where this file is located. Please note that --data-dir is supposed to be used by installation scripts and therefore the GUI does not start when it is used, all that happens is that the setting is configured.
%1. Cppcheck . --data-dir=<directory> . , --data-dir . , .
Open the report file
Text files (*.txt)
(*.txt)
CSV files (*.csv)
CSV (*.csv)
Project files (*.cppcheck);;All files(*.*)
(*.cppcheck);; (*.*)
Select Project File
Project:
:
No suitable files found to analyze!
C/C++ Source
C/C++
Compile database
Visual Studio
Visual Studio
Borland C++ Builder 6
Borland C++ Builder 6
Select files to analyze
Select directory to analyze
Select the configuration that will be analyzed
Found project files from the directory.
Do you want to proceed analysis without using any of these project files?
.
?
Current results will be cleared.
Opening a new XML file will clear current results.
Do you want to proceed?
.
XML- .
?
Analyzer is running.
Do you want to stop the analysis and exit Cppcheck?
.
Cppcheck?
About
XML files (*.xml);;Text files (*.txt);;CSV files (*.csv)
XML (*.xml);; (*.txt);;CSV (*.csv)
Build dir '%1' does not exist, create it?
'%1' , ?
To check the project using addons, you need a build directory.
Failed to open file
Unknown project file format
Failed to import project file
Failed to import '%1': %2
Analysis is stopped.
Failed to import '%1' (%2), analysis is stopped
Show Mandatory
Show Required
Show Advisory
Show Document
Show L1
Show L2
Show L3
Show style
Show portability
Show performance
Show information
Failed to import '%1', analysis is stopped
'%1',
Project files (*.cppcheck)
(*.cppcheck)
Select Project Filename
No project file loaded
The project file
%1
could not be found!
Do you want to remove the file from the recently used projects -list?
%1
!
?
Install
New version available: %1. %2
Cppcheck GUI.
Syntax:
cppcheck-gui [OPTIONS] [files or paths]
Options:
-h, --help Print this help
-p <file> Open given project file and start checking it
-l <file> Open given results xml file
-d <directory> Specify the directory that was checked to generate the results xml specified with -l
-v, --version Show program version
--data-dir=<directory> This option is for installation scripts so they can configure the directory where
datafiles are located (translations, cfg). The GUI is not started when this option
is used.
Cppcheck GUI.
Syntax:
cppcheck-gui [OPTIONS] [files or paths]
Options:
-h, --help Print this help
-p <file> Open given project file and start checking it
-l <file> Open given results xml file
-d <directory> Specify the directory that was checked to generate the results xml specified with -l
-v, --version Show program version
--data-dir=<directory> Specify directory where GUI datafiles are located (translations, cfg)
Cppcheck GUI.
:
cppcheck-gui [] [ ]
:
-h, --help .
-p <file>
-l <file> xml-
-d <directory> , xml, -l
-v, --version .
--data-dir=<directory> ,
, (, ).
, .
Cppcheck GUI - Command line parameters
Cppcheck GUI -
NewSuppressionDialog
New suppression
Error ID
ID
File name
Line number
Symbol name
Edit suppression
Platforms
Native
Unix 32-bit
Unix 32-bit
Unix 64-bit
Unix 64-bit
Windows 32-bit ANSI
Windows 32-bit ANSI
Windows 32-bit Unicode
Windows 32-bit Unicode
Windows 64-bit
Windows 64-bit
ProjectFile
Project File
Paths and Defines
Import Project (Visual studio / compile database/ Borland C++ Builder 6)
Import Project (Visual studio / compile database)
(Visual studio / compile database/ Borland C++ Builder 6)
Defines must be separated by a semicolon. Example: DEF1;DEF2=5;DEF3=int
Defines must be separated by a semicolon ';'
Defines ';'
Note: Put your own custom .cfg files in the same folder as the project file. You should see them above.
.cfg- . .
Clang (experimental)
If you want to design your classes to be as flexible and robust as possible then the public interface must be very robust. Cppcheck will asumme that arguments can take *any* value.
Check code in headers (should be ON normally. if you want a limited quick analysis then turn this OFF)
Max recursion in template instantiation
Filepaths in warnings will be relative to this path
If tags are added, you will be able to right click on warnings and set one of these tags. You can manually categorize warnings.
Exclude source files
Exclude folder...
Exclude file...
MISRA C 2012
MISRA C 2012
MISRA rule texts
MISRA
<html><head/><body><p>Copy/paste the text from Appendix A "Summary of guidelines" from the MISRA C 2012 pdf to a text file.</p></body></html>
<html><head/><body><p> Appendix A "Summary of guidelines" MISRA C 2012 pdf .</p></body></html>
...
...
<html><head/><body><p>You have a choice:</p><p> * Analyze all Debug and Release configurations</p><p> * Only analyze the first matching Debug configuration</p><p><br/></p></body></html>
<html><head/><body><p>:</p><p> * Debug Release</p><p> * Debug</p><p><br/></p></body></html>
Browse...
...
Analyze all Visual Studio configurations
Visual Studio
Selected VS Configurations
Paths:
:
Add...
...
Edit
Remove
Undefines:
:
Undefines must be separated by a semicolon. Example: UNDEF1;UNDEF2;UNDEF3
, : UNDEF1;UNDEF2;UNDEF3
Include Paths:
:
Include file
<html><head/><body><p><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">Force inclusion of a header file</span></p></body></html>
Browse..
Types and Functions
Analysis
This is a workfolder that Cppcheck will use for various purposes.
Parser
Cppcheck (built in)
Check level
Reduced -- meant for usage where developer wants results directly. Limited and faster analysis with fewer results.
Normal -- meant for normal analysis in CI. Analysis should finish in reasonable time.
Exhaustive -- meant for nightly builds etc. Analysis time can be longer (10x slower than compilation is OK).
Check that each class has a safe public interface
Limit analysis
Check code in unused templates (should be ON normally, however in theory you can safely ignore warnings in unused templates)
Check code in unused templates (slower and less accurate analysis)
Max CTU depth
CTU
Enable inline suppressions
inline-
2025
Misra C++
2008
Cert C
CERT-INT35-C: int precision (if size equals precision, you can leave empty)
Autosar
Safety profiles (defined in C++ core guidelines)
Bug hunting
External tools
Up
Down
Platform
Warning options
Root path:
:
Warning tags (separated by semicolon)
( ';')
Cppcheck build dir (whole program analysis, incremental analysis, statistics, etc)
Cppcheck
Libraries
Suppressions
Add
Addons
Note: Addons require <a href="https://www.python.org/">Python</a> being installed.
Y2038
Thread safety
Coding standards
Misra C
2012
2023
Cert C++
Bug hunting (Premium)
Defines:
:
ProjectFileDialog
Project file: %1
: %1
Select Cppcheck build dir
Cppcheck
Select include directory
Select a directory to check
Note: Open source Cppcheck does not fully implement Misra C 2012
Clang-tidy (not found)
Clang-tidy ( )
Visual Studio
Visual Studio
Compile database
Borland C++ Builder 6
Borland C++ Builder 6
Import Project
C/C++ header
Include file
Select directory to ignore
,
Source files
All files
Exclude file
Select MISRA rule texts file
MISRA
MISRA rule texts file (%1)
MISRA (%1)
QObject
Unknown language specified!
!
Language file %1 not found!
Language file %1.qm not found!
%1 !
Failed to load translation for language %1 from file %2
Failed to load translation for language %1 from file %2.qm
%1 %2
line %1: Unhandled element %2
line %1: Mandatory attribute '%2' missing in '%3'
(Not found)
()
Thin
ExtraLight
Light
Normal
Medium
DemiBold
Bold
ExtraBold
Black
Editor Foreground Color
Editor Background Color
Highlight Background Color
Line Number Foreground Color
Line Number Background Color
Keyword Foreground Color
Keyword Font Weight
Class Foreground Color
Class ForegroundColor
Class Font Weight
Quote Foreground Color
Quote Font Weight
Comment Foreground Color
Comment Font Weight
Symbol Foreground Color
Symbol Background Color
Symbol Font Weight
Set to Default Light
Set to Default Dark
File
Line
Severity
Classification
Level
Inconclusive
Summary
Id
Id
Guideline
Rule
Since date
Tags
QPlatformTheme
OK
OK
Cancel
Close
Save
ResultsTree
File
Severity
Line
Summary
Undefined file
Copy
Could not find file:
:
Please select the folder '%1'
'%1'
Select Directory '%1'
'%1'
Please select the directory where file is located.
.
debug
note
Recheck
Hide
Hide all with id
id
Suppress selected id(s)
id
Open containing folder
internal
Recheck %1 file(s)
Hide %1 result(s)
Tag
No tag
Cppcheck
Cppcheck
No editor application configured.
Configure the editor application for Cppcheck in preferences/Applications.
Configure the text file viewer program in Cppcheck preferences/Applications.
.
Cppcheck /.
No default editor application selected.
Please select the default editor application in preferences/Applications.
.
/.
Could not find the file!
!
Could not start %1
Please check the application path and parameters are correct.
%1
, , .
Select Directory
Id
Id
Inconclusive
Since date
style
error
warning
performance
portability
information
ResultsView
Print Report
No errors found, nothing to print.
, .
%p% (%1 of %2 files checked)
%p% (%1 %2 )
Cppcheck
Cppcheck
No errors found.
.
Errors were found, but they are configured to be hidden.
To toggle what kind of errors are shown, open view menu.
, .
, .
Failed to read the report.
.
XML format version 1 is no longer supported.
XML 1 .
First included by
Id
Id
Clear Log
Copy this Log entry
Copy complete Log
Analysis was stopped
There was a critical error with id '%1'
when checking %1
when checking a file
Analysis was aborted.
Failed to save the report.
.
Results
Critical errors
Analysis Log
Warning Details
ScratchPad
Scratchpad
Copy or write some C/C++ code here:
C/C++:
Optionally enter a filename (mainly for automatic language detection) and click on "Check":
"":
filename
Check
Settings
Preferences
General
Add...
...
Number of threads:
:
Ideal count:
:
Force checking all #ifdef configurations
Check all #ifdef configurations
#ifdef
Show full path of files
Show "No errors found" message when no errors found
,
Display error Id in column "Id"
"id"
Enable inline suppressions
inline-
Check for inconclusive errors also
Show statistics on check completion
Check for updates
Show internal warnings in log
Addons
Python binary (leave this empty to use python in the PATH)
Python ( python PATH)
...
...
MISRA addon
MISRA
MISRA rule texts file
MISRA:
<html><head/><body><p>Copy/paste the text from Appendix A "Summary of guidelines" from the MISRA C 2012 pdf to a text file.</p></body></html>
<html><head/><body><p> Appendix A "Summary of guidelines" MISRA C 2012 pdf .</p></body></html>
Clang
Clang
Clang path (leave empty to use system PATH)
Clang ( clang PATH)
Visual Studio headers
Visual Studio
<html><head/><body><p>Paths to Visual Studio headers, separated by semicolon ';'.</p><p>You can open a Visual Studio command prompt, write "SET INCLUDE". Then copy/paste the paths.</p></body></html>
<html><head/><body><p> Visual Studio headers, ';'.</p><p> Visual Studio, "SET INCLUDE" .</p></body></html>
Code Editor
Code Editor Style
System Style
Default Light Style
Default Dark Style
Custom
Remove
Max count:
Applications
Edit...
...
Set as default
Reports
Save all errors when creating report
Save full path to files in reports
Language
SettingsDialog
N/A
The executable file "%1" is not available
Add a new application
Modify an application
[Default]
[ ]
[Default]
[ ]
Select python binary
python
Select MISRA File
MISRA
Select clang path
clang
StatsDialog
Statistics
Project
Project:
:
Paths:
:
Include paths:
:
Defines:
:
Undefines:
:
Previous Scan
Path Selected:
:
Number of Files Scanned:
:
Scan Duration:
:
Errors:
:
Warnings:
:
Stylistic warnings:
:
Portability warnings:
:
Performance issues:
:
Information messages:
:
Active checkers:
Checkers
History
File:
:
Copy to Clipboard
Pdf Export
PDF
1 day
1
%1 days
%1
1 hour
1
%1 hours
%1
1 minute
1
%1 minutes
%1
1 second
1
%1 seconds
%1
0.%1 seconds
0.1%1
and
Export PDF
PDF
Project Settings
Paths
Include paths
Defines
:
Undefines
:
Path selected
Number of files scanned
Scan duration
Errors
File:
:
No cppcheck build dir
Warnings
Style warnings
Portability warnings
Performance warnings
Information messages
ThreadDetails
Thread Details
ThreadResult
%1 of %2 files checked
%1 %2
TranslationHandler
Failed to change the user interface language:
%1
The user interface language has been reset to English. Open the Preferences-dialog to select any of the available languages.
:
%1
. - .
Cppcheck
Cppcheck
TxtReport
inconclusive
toFilterString
All supported files (%1)
(%1)
All files (%1)
(%1)