diff --git a/doc/qtcreator/images/icons/home.png b/doc/qtcreator/images/icons/home.png new file mode 100644 index 00000000000..21e7d63a104 Binary files /dev/null and b/doc/qtcreator/images/icons/home.png differ diff --git a/doc/qtcreator/images/icons/info.png b/doc/qtcreator/images/icons/info.png new file mode 100644 index 00000000000..eace805de31 Binary files /dev/null and b/doc/qtcreator/images/icons/info.png differ diff --git a/doc/qtcreator/images/qtcreator-axivion-annotation.webp b/doc/qtcreator/images/qtcreator-axivion-annotation.webp new file mode 100644 index 00000000000..5879a1c19f5 Binary files /dev/null and b/doc/qtcreator/images/qtcreator-axivion-annotation.webp differ diff --git a/doc/qtcreator/images/qtcreator-axivion-view-rule.webp b/doc/qtcreator/images/qtcreator-axivion-view-rule.webp new file mode 100644 index 00000000000..30a5427885f Binary files /dev/null and b/doc/qtcreator/images/qtcreator-axivion-view-rule.webp differ diff --git a/doc/qtcreator/images/qtcreator-axivion-view.webp b/doc/qtcreator/images/qtcreator-axivion-view.webp new file mode 100644 index 00000000000..c9003d5cb48 Binary files /dev/null and b/doc/qtcreator/images/qtcreator-axivion-view.webp differ diff --git a/doc/qtcreator/images/qtcreator-edit-dashboard-configuration.webp b/doc/qtcreator/images/qtcreator-edit-dashboard-configuration.webp new file mode 100644 index 00000000000..3f76b4427a3 Binary files /dev/null and b/doc/qtcreator/images/qtcreator-edit-dashboard-configuration.webp differ diff --git a/doc/qtcreator/images/qtcreator-preferences-axivion-project.webp b/doc/qtcreator/images/qtcreator-preferences-axivion-project.webp new file mode 100644 index 00000000000..4656ab1d80d Binary files /dev/null and b/doc/qtcreator/images/qtcreator-preferences-axivion-project.webp differ diff --git a/doc/qtcreator/images/qtcreator-preferences-axivion.webp b/doc/qtcreator/images/qtcreator-preferences-axivion.webp new file mode 100644 index 00000000000..f884259a54a Binary files /dev/null and b/doc/qtcreator/images/qtcreator-preferences-axivion.webp differ diff --git a/doc/qtcreator/src/analyze/creator-analyze.qdoc b/doc/qtcreator/src/analyze/creator-analyze.qdoc index 4a4e05f413c..f1eb052ea02 100644 --- a/doc/qtcreator/src/analyze/creator-analyze.qdoc +++ b/doc/qtcreator/src/analyze/creator-analyze.qdoc @@ -1,4 +1,4 @@ -// Copyright (C) 2022 The Qt Company Ltd. +// Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only // ********************************************************************** @@ -44,6 +44,11 @@ example, and use the results to make the tests more efficient and complete. + \li \l{Static Code Analysis}{Axivion} + + Do static code analysis and architecture analysis to detect and + eliminate unnecessary complexity of code. + \li \l{Using Valgrind Code Analysis Tools}{Valgrind Code Analysis Tools} Detect problems in memory management by using the Memcheck diff --git a/doc/qtcreator/src/analyze/creator-axivion.qdoc b/doc/qtcreator/src/analyze/creator-axivion.qdoc new file mode 100644 index 00000000000..244991c7834 --- /dev/null +++ b/doc/qtcreator/src/analyze/creator-axivion.qdoc @@ -0,0 +1,109 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only + +/*! + \previouspage creator-coco.html + \page creator-axivion.html + \nextpage creator-valgrind-overview.html + + \title Static Code Analysis + + \l{https://www.axivion.com/en/products/axivion-suite/}{Axivion Suite} is + a tool suite for protecting software from erosion. Static code analysis, + architecture analysis, and code-smells-detection enable you to: + + \list + \li Check the source code for potential runtime errors. + \li Use metrics to generate quantitative information about the + internal quality of the source code. + \li Run style checks to achieve compliance with coding guidelines. + \li Detect both duplicates and similar pieces of code in the source code. + \li Recognize cyclical dependencies at different levels. + \li Detect unreachable code. + \endlist + + The experimental Axivion plugin integrates the Axivion dashboard server into + \QC. + + To use the plugin, you must set up a project in the Axivion dashboard + server and link to it from \QC. You can then see style violations in the + \uicontrol Edit mode and descriptions and issue counts in the + \uicontrol Axivion view. + + The editor shows style violations as inline annotations. Hover the mouse over + an annotation to bring up a tool tip with a short description of the issue. + + \image qtcreator-axivion-annotation.webp {Annotation popup} + + Select the \inlineimage icons/info.png + button to view detailed information about the issue in the \uicontrol Axivion + view. + + \image qtcreator-axivion-view-rule.webp {Axivion view} + + To view the issue counts, select \inlineimage icons/home.png + (\uicontrol {Show Dashboard}). + + \section1 Enabling the Axivion Plugin + + To enable the Axivion plugin: + + \list 1 + \li Select \uicontrol Help > \uicontrol {About Plugins} > + \uicontrol {Code Analyzer} > \uicontrol Axivion to enable the plugin. + \li Select \uicontrol {Restart Now} to restart \QC and load the plugin. + \endlist + + \section1 Connecting to Axivion Dashboard Servers + + To connect to Axivion: + + \list 1 + \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Axivion. + \image qtcreator-preferences-axivion.webp {General tab in Axivion Preferences} + \li Select \uicontrol Edit to create a connection to the Axivion + dashboard server. + \image qtcreator-edit-dashboard-configuration.webp {Edit Dashboard Configuration dialog} + \li In \uicontrol {Dashboard URL}, enter the URL of the server. + \li In \uicontrol Description, enter a free-text description of the + server. + \li In \uicontrol {Access token}, enter the IDE application token that + you created in the server, in user preferences. + \endlist + + \section1 Linking to Dashboards + + To link a project to a dashboard: + + \list 1 + \li \uicontrol Projects > \uicontrol {Project Settings} > + \uicontrol Axivion. + \image qtcreator-preferences-axivion-project.webp {Axivion settings in Project Settings} + \li Select \uicontrol {Fetch Projects} to list projects from Axivion. + \li Select a project, and then select \uicontrol {Link Project} to link + to it. + \endlist + + To unlink a project, select \uicontrol {Unlink Project}. + + \section1 Viewing Issue Counts + + \image qtcreator-axivion-view.webp {Axivion view} + + The \uicontrol Axivion view lists the numbers of the following types of + issues that Axivion found in the linked project: + + \list + \li \uicontrol AV - architecture violations, such as hidden dependencies + \li \uicontrol CL - duplicates and similar pieces of code + \li \uicontrol CY - call, component, and include cycles + \li \uicontrol DE - dead code + \li \uicontrol MV - violations of metrics based on lines and tokens, + nesting, cyclomatic complexity, control flow, and so on. + \li \uicontrol SV - style violations, such as deviations from the naming + or coding conventions + \endlist + + To clear the view, select \inlineimage icons/clean_pane_small.png + (\uicontrol Clear). +*/ diff --git a/doc/qtcreator/src/analyze/creator-coco.qdoc b/doc/qtcreator/src/analyze/creator-coco.qdoc index 3a714d9bc08..0818e9a5b92 100644 --- a/doc/qtcreator/src/analyze/creator-coco.qdoc +++ b/doc/qtcreator/src/analyze/creator-coco.qdoc @@ -4,7 +4,7 @@ /*! \previouspage creator-qml-performance-monitor.html \page creator-coco.html - \nextpage creator-valgrind-overview.html + \nextpage creator-axivion.html \title Checking Code Coverage diff --git a/doc/qtcreator/src/analyze/creator-valgrind-overview.qdoc b/doc/qtcreator/src/analyze/creator-valgrind-overview.qdoc index 96b1195f3e6..9a2f914648f 100644 --- a/doc/qtcreator/src/analyze/creator-valgrind-overview.qdoc +++ b/doc/qtcreator/src/analyze/creator-valgrind-overview.qdoc @@ -8,7 +8,7 @@ // ********************************************************************** /*! - \previouspage creator-coco.html + \previouspage creator-axivion.html \page creator-valgrind-overview.html \nextpage creator-analyzer.html diff --git a/doc/qtcreator/src/qtcreator-toc.qdoc b/doc/qtcreator/src/qtcreator-toc.qdoc index e1efb659240..9b0cd51c993 100644 --- a/doc/qtcreator/src/qtcreator-toc.qdoc +++ b/doc/qtcreator/src/qtcreator-toc.qdoc @@ -205,6 +205,7 @@ \list \li \l{Profiling QML Applications} \li \l{Checking Code Coverage} + \li \l{Static Code Analysis} \li \l{Using Valgrind Code Analysis Tools} \list \li \l{Detecting Memory Leaks with Memcheck} diff --git a/doc/qtcreator/src/user-interface/creator-ui.qdoc b/doc/qtcreator/src/user-interface/creator-ui.qdoc index 0867b32374b..f5e59218f46 100644 --- a/doc/qtcreator/src/user-interface/creator-ui.qdoc +++ b/doc/qtcreator/src/user-interface/creator-ui.qdoc @@ -392,6 +392,10 @@ \li \uicontrol{General Messages} + \if defined(qtcreator) + \li \l {Static Code Analysis}{Axivion} + \endif + \li \uicontrol{Version Control} \if defined(qtcreator)