summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@qt.io>2018-10-16 10:22:11 +0200
committerLeena Miettinen <riitta-leena.miettinen@qt.io>2018-10-19 08:55:47 +0000
commit626b9769493dcbdf275142bb65200977500353fe (patch)
tree69d1368163fa44d8c0592e8f3cab302e3c6ff626 /doc
parent5719adc47c7c60c54138e5eeb9f4c2827ac787b1 (diff)
downloadqt-creator-626b9769493dcbdf275142bb65200977500353fe.tar.gz
Doc: Add info about experimental Cppcheck plugin
Change-Id: If65414586c159d7391574523dde67f12ea93a439 Reviewed-by: Sergey Morozov <dev@gres.biz> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/images/qtcreator-cppcheck-options.pngbin0 -> 24786 bytes
-rw-r--r--doc/src/analyze/cpu-usage-analyzer.qdoc2
-rw-r--r--doc/src/analyze/creator-analyze.qdoc5
-rw-r--r--doc/src/analyze/creator-cppcheck.qdoc85
-rw-r--r--doc/src/howto/creator-only/creator-autotest.qdoc2
-rw-r--r--doc/src/qtcreator-toc.qdoc1
6 files changed, 93 insertions, 2 deletions
diff --git a/doc/images/qtcreator-cppcheck-options.png b/doc/images/qtcreator-cppcheck-options.png
new file mode 100644
index 0000000000..56610aa13b
--- /dev/null
+++ b/doc/images/qtcreator-cppcheck-options.png
Binary files differ
diff --git a/doc/src/analyze/cpu-usage-analyzer.qdoc b/doc/src/analyze/cpu-usage-analyzer.qdoc
index 4588a5a5b6..54c0184612 100644
--- a/doc/src/analyze/cpu-usage-analyzer.qdoc
+++ b/doc/src/analyze/cpu-usage-analyzer.qdoc
@@ -33,7 +33,7 @@
\contentspage index.html
\previouspage creator-heob.html
\page creator-cpu-usage-analyzer.html
- \nextpage creator-autotest.html
+ \nextpage creator-cppcheck.html
\title Analyzing CPU Usage
diff --git a/doc/src/analyze/creator-analyze.qdoc b/doc/src/analyze/creator-analyze.qdoc
index a11b2c3617..87910e3ecb 100644
--- a/doc/src/analyze/creator-analyze.qdoc
+++ b/doc/src/analyze/creator-analyze.qdoc
@@ -81,6 +81,11 @@
desktop applications with the Performance Analyzer (commercial only)
that integrates the Linux Perf tool.
+ \li \l{Analyzing Code with Cppcheck}
+
+ You can use the experimental Cppcheck plugin to detect undefined
+ behavior and dangerous coding constructs.
+
\endlist
*/
diff --git a/doc/src/analyze/creator-cppcheck.qdoc b/doc/src/analyze/creator-cppcheck.qdoc
new file mode 100644
index 0000000000..29e3d1ff7e
--- /dev/null
+++ b/doc/src/analyze/creator-cppcheck.qdoc
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Creator documentation.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+**
+****************************************************************************/
+
+/*!
+ \contentspage index.html
+ \previouspage creator-cpu-usage-analyzer.html
+ \page creator-cppcheck.html
+ \nextpage creator-autotest.html
+
+ \title Analyzing Code with Cppcheck
+
+ \l{http://cppcheck.sourceforge.net/}{Cppcheck} is a static analysis tool
+ that detects errors in C++ code. Static analysis is performed on the source
+ code without actually executing the application.
+
+ 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:
+
+ \list 1
+ \li Select \uicontrol Help > \uicontrol {About Plugins} >
+ \uicontrol {Code Analyzer} > \uicontrol Cppcheck to enable the
+ plugin.
+ \li Restart \QC to 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"
+ \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.
+ \note By default, Cppcheck uses multiple threads to perform checks.
+ Selecting the \uicontrol {Unused functions} option disables the
+ default behavior.
+ \li In the \uicontrol {Custom arguments} field, enter additional
+ arguments for running Cppcheck. The arguments might be shadowed
+ by automatically generated ones. To avoid possible conflicts in
+ configuration, select the \uicontrol {Show raw output} check box
+ to see the final arguments.
+ \li In the \uicontrol {Ignored file patterns} field, enter a filter
+ for ignoring files that match the pattern (wildcard). You can enter
+ multiple patterns separated by commas. Even though Cppcheck is not
+ run on files that match the provided patterns, they might be
+ implicitly checked if other files include them.
+ \li Select the \uicontrol {Inconclusive errors} check box to also
+ mark possible false positives.
+ \li Select the \uicontrol {Check all define combinations} check box to
+ check all define combinations. Enabling this option can significantly
+ slow down analysis, but might help to find more issues.
+ \li Select the \uicontrol {Add include paths} check box to pass the
+ current project's include paths to Cppcheck. Enabling this option
+ slows down checks on big projects, but can help Cppcheck to find
+ missing includes.
+ \li Select the \uicontrol {Calculate additional arguments} check box to
+ calculate additional arguments based on current project's settings
+ (such as the language used and standard version) and pass them to
+ Cppcheck.
+ \endlist
+
+ \QC automatically runs Cppcheck on currently opened documents and displays
+ results via text marks or annotations.
+*/
diff --git a/doc/src/howto/creator-only/creator-autotest.qdoc b/doc/src/howto/creator-only/creator-autotest.qdoc
index 1848e0f8a5..d5d51edb64 100644
--- a/doc/src/howto/creator-only/creator-autotest.qdoc
+++ b/doc/src/howto/creator-only/creator-autotest.qdoc
@@ -25,7 +25,7 @@
/*!
\contentspage index.html
- \previouspage creator-cpu-usage-analyzer.html
+ \previouspage creator-cppcheck.html
\page creator-autotest.html
\nextpage creator-advanced.html
diff --git a/doc/src/qtcreator-toc.qdoc b/doc/src/qtcreator-toc.qdoc
index 89d19a619c..72826d0034 100644
--- a/doc/src/qtcreator-toc.qdoc
+++ b/doc/src/qtcreator-toc.qdoc
@@ -192,6 +192,7 @@
\li \l{Using Clang Tools}
\li \l{Detecting Memory Leaks with Heob}
\li \l{Analyzing CPU Usage}
+ \li \l{Analyzing Code with Cppcheck}
\endlist
\li \l{Running Autotests}
\endlist