forked from qt-creator/qt-creator
Doc: Describe the command to run Cppcheck on selected files
Task-number: QTCREATORBUG-23364 Change-Id: If21f647e5d7bbafae1d14b489aadd57d423cc663 Reviewed-by: Sergey Morozov <dev@gres.biz> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Binary file not shown.
Before Width: | Height: | Size: 24 KiB |
BIN
doc/qtcreator/images/qtcreator-cppcheck-run-configuration.png
Normal file
BIN
doc/qtcreator/images/qtcreator-cppcheck-run-configuration.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
@@ -38,20 +38,29 @@
|
||||
The experimental Cppcheck Diagnostics plugin integrates diagnostics
|
||||
that are generated by the Cppcheck tool into the C++ editor.
|
||||
|
||||
To enable running Cppcheck automatically on currently open files:
|
||||
Cppcheck is automatically run on open files. To select the files to
|
||||
check in the currently active project, select \uicontrol Analyze >
|
||||
\uicontrol Cppcheck.
|
||||
|
||||
\section1 Enabling the Cppcheck Plugin
|
||||
|
||||
To enable the Cppcheck plugin:
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol Help > \uicontrol {About Plugins} >
|
||||
\uicontrol {Code Analyzer} > \uicontrol Cppcheck to enable the
|
||||
plugin.
|
||||
\li Select \uicontrol {Restart Now} to restart \QC and load the plugin.
|
||||
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol Analyzer
|
||||
> \uicontrol Cppcheck to specify settings for running Cppcheck.
|
||||
\image qtcreator-cppcheck-options.png "Cppcheck options"
|
||||
\endlist
|
||||
|
||||
\section1 Running Cppcheck on Selected Files
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol Analyze > \uicontrol Cppcheck.
|
||||
\image qtcreator-cppcheck-run-configuration.png "Cppcheck run configuration"
|
||||
\li In the \uicontrol Binary field, enter the path to the Cppcheck
|
||||
executable file.
|
||||
\li In the \uicontrol Checks group, select the checks to perform on
|
||||
currently open files.
|
||||
\li In the \uicontrol Checks group, select the checks to perform.
|
||||
\note By default, Cppcheck uses multiple threads to perform checks.
|
||||
Selecting the \uicontrol {Unused functions} option disables the
|
||||
default behavior.
|
||||
@@ -78,8 +87,14 @@
|
||||
calculate additional arguments based on current project's settings
|
||||
(such as the language used and standard version) and pass them to
|
||||
Cppcheck.
|
||||
\li Select the files to run Cppcheck on.
|
||||
\li Select \uicontrol Analyze.
|
||||
\endlist
|
||||
|
||||
\QC automatically runs Cppcheck on currently opened documents and displays
|
||||
results via text marks or annotations.
|
||||
\QC runs Cppcheck on the selected files and displays results via text
|
||||
marks or annotations.
|
||||
|
||||
To specify the settings above for the automatically run checks,
|
||||
select \uicontrol Tools > \uicontrol Options > \uicontrol Analyzer
|
||||
> \uicontrol Cppcheck.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user