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:
Leena Miettinen
2020-03-30 14:10:52 +02:00
parent 7222df86d1
commit c80fc180a3
3 changed files with 23 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -38,20 +38,29 @@
The experimental Cppcheck Diagnostics plugin integrates diagnostics The experimental Cppcheck Diagnostics plugin integrates diagnostics
that are generated by the Cppcheck tool into the C++ editor. 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 \list 1
\li Select \uicontrol Help > \uicontrol {About Plugins} > \li Select \uicontrol Help > \uicontrol {About Plugins} >
\uicontrol {Code Analyzer} > \uicontrol Cppcheck to enable the \uicontrol {Code Analyzer} > \uicontrol Cppcheck to enable the
plugin. plugin.
\li Select \uicontrol {Restart Now} to restart \QC and load the plugin. \li Select \uicontrol {Restart Now} to restart \QC and load the plugin.
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol Analyzer \endlist
> \uicontrol Cppcheck to specify settings for running Cppcheck.
\image qtcreator-cppcheck-options.png "Cppcheck options" \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 \li In the \uicontrol Binary field, enter the path to the Cppcheck
executable file. executable file.
\li In the \uicontrol Checks group, select the checks to perform on \li In the \uicontrol Checks group, select the checks to perform.
currently open files.
\note By default, Cppcheck uses multiple threads to perform checks. \note By default, Cppcheck uses multiple threads to perform checks.
Selecting the \uicontrol {Unused functions} option disables the Selecting the \uicontrol {Unused functions} option disables the
default behavior. default behavior.
@@ -78,8 +87,14 @@
calculate additional arguments based on current project's settings calculate additional arguments based on current project's settings
(such as the language used and standard version) and pass them to (such as the language used and standard version) and pass them to
Cppcheck. Cppcheck.
\li Select the files to run Cppcheck on.
\li Select \uicontrol Analyze.
\endlist \endlist
\QC automatically runs Cppcheck on currently opened documents and displays \QC runs Cppcheck on the selected files and displays results via text
results via text marks or annotations. marks or annotations.
To specify the settings above for the automatically run checks,
select \uicontrol Tools > \uicontrol Options > \uicontrol Analyzer
> \uicontrol Cppcheck.
*/ */