diff --git a/doc/qtcreator/images/icons/axivion-av.png b/doc/qtcreator/images/icons/axivion-av.png new file mode 100644 index 00000000000..54dcd301ea2 Binary files /dev/null and b/doc/qtcreator/images/icons/axivion-av.png differ diff --git a/doc/qtcreator/images/icons/axivion-cl.png b/doc/qtcreator/images/icons/axivion-cl.png new file mode 100644 index 00000000000..0e2de82f18d Binary files /dev/null and b/doc/qtcreator/images/icons/axivion-cl.png differ diff --git a/doc/qtcreator/images/icons/axivion-cy.png b/doc/qtcreator/images/icons/axivion-cy.png new file mode 100644 index 00000000000..11bddb048e7 Binary files /dev/null and b/doc/qtcreator/images/icons/axivion-cy.png differ diff --git a/doc/qtcreator/images/icons/axivion-de.png b/doc/qtcreator/images/icons/axivion-de.png new file mode 100644 index 00000000000..9c00fd42b40 Binary files /dev/null and b/doc/qtcreator/images/icons/axivion-de.png differ diff --git a/doc/qtcreator/images/icons/axivion-mv.png b/doc/qtcreator/images/icons/axivion-mv.png new file mode 100644 index 00000000000..c34272c414b Binary files /dev/null and b/doc/qtcreator/images/icons/axivion-mv.png differ diff --git a/doc/qtcreator/images/icons/axivion-sv.png b/doc/qtcreator/images/icons/axivion-sv.png new file mode 100644 index 00000000000..e8e0eb70ef3 Binary files /dev/null and b/doc/qtcreator/images/icons/axivion-sv.png differ diff --git a/doc/qtcreator/images/qtcreator-axivion-annotation.webp b/doc/qtcreator/images/qtcreator-axivion-annotation.webp index 5879a1c19f5..9cfd1407e30 100644 Binary files a/doc/qtcreator/images/qtcreator-axivion-annotation.webp and b/doc/qtcreator/images/qtcreator-axivion-annotation.webp differ diff --git a/doc/qtcreator/images/qtcreator-axivion-issue-search.webp b/doc/qtcreator/images/qtcreator-axivion-issue-search.webp new file mode 100644 index 00000000000..b7f13e50356 Binary files /dev/null and b/doc/qtcreator/images/qtcreator-axivion-issue-search.webp differ diff --git a/doc/qtcreator/images/qtcreator-axivion-view-rule.webp b/doc/qtcreator/images/qtcreator-axivion-view-rule.webp index 30a5427885f..9bbca00d9ea 100644 Binary files a/doc/qtcreator/images/qtcreator-axivion-view-rule.webp 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 index c019284503c..0d1614b4eba 100644 Binary files a/doc/qtcreator/images/qtcreator-axivion-view.webp 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 index 3f76b4427a3..43d997ec424 100644 Binary files a/doc/qtcreator/images/qtcreator-edit-dashboard-configuration.webp and b/doc/qtcreator/images/qtcreator-edit-dashboard-configuration.webp differ diff --git a/doc/qtcreator/images/qtcreator-preferences-axivion.webp b/doc/qtcreator/images/qtcreator-preferences-axivion.webp index f884259a54a..a6b69dd1ff5 100644 Binary files a/doc/qtcreator/images/qtcreator-preferences-axivion.webp 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 7438249701f..a29ab100155 100644 --- a/doc/qtcreator/src/analyze/creator-analyze.qdoc +++ b/doc/qtcreator/src/analyze/creator-analyze.qdoc @@ -44,7 +44,7 @@ example, and use the results to make the tests more efficient and complete. - \li \l{Static Code Analysis}{Axivion} + \li \l{Prevent code erosion}{Axivion} Do static code analysis and architecture analysis to detect and eliminate unnecessary complexity of code. diff --git a/doc/qtcreator/src/analyze/creator-axivion.qdoc b/doc/qtcreator/src/analyze/creator-axivion.qdoc index f188c84151b..b45d1f5fb19 100644 --- a/doc/qtcreator/src/analyze/creator-axivion.qdoc +++ b/doc/qtcreator/src/analyze/creator-axivion.qdoc @@ -1,16 +1,17 @@ -// Copyright (C) 2023 The Qt Company Ltd. +// Copyright (C) 2024 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 + \previouspage creator-how-tos.html - \title Static Code Analysis + \ingroup creator-how-to-analyze + + \title Prevent code erosion \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: + a tool suite for protecting software from erosion. With static code analysis, + architecture analysis, and code-smells-detection, you can: \list \li Check the source code for potential runtime errors. @@ -22,50 +23,164 @@ \li Detect unreachable code. \endlist - The experimental Axivion plugin integrates the Axivion dashboard server into - \QC. + Connect to an Axivion dashboard server from \QC to view results of code + analysis. \note Enable the Axivion plugin to use it. 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. + server and link to it from \QC. You can then see found issues in the + \uicontrol Edit mode, issues in the \uicontrol Axivion dashboard, and + issue details in the \uicontrol Axivion sidebar view. - The editor shows style violations as inline annotations. Hover the mouse over + The editor shows found issues 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. + Select \inlineimage icons/info.png to view detailed information about the + issue in the \uicontrol Axivion sidebar view. - \image qtcreator-axivion-view-rule.webp {Axivion view} + \image qtcreator-axivion-view-rule.webp {Axivion sidebar view} + + \section1 View issue counts To view the issue counts, select \inlineimage icons/home.png - (\uicontrol {Show Dashboard}). + (\uicontrol {Show Dashboard}) in the \uicontrol Axivion dashboard. - \section1 Connecting to Axivion Dashboard Servers + \image qtcreator-axivion-view.webp {Axivion dashboard} - To connect to Axivion: + The \uicontrol Axivion dashboard lists the numbers of the following types of + issues that Axivion found in the linked project: + + \table + \header + \li Icon + \li Type + \li Description + \row + \li \inlineimage icons/axivion-av.png + \li \uicontrol AV + \li Architecture violations, such as hidden dependencies. + \row + \li \inlineimage icons/axivion-cl.png + \li \uicontrol CL + \li Clones, such as duplicates and similar pieces of code. + \row + \li \inlineimage icons/axivion-cy.png + \li \uicontrol CY + \li Cyclic dependencies, such as call, component, and include cycles. + \row + \li \inlineimage icons/axivion-de.png + \li \uicontrol DE + \li Dead entities are callable entities in the source code that cannot + be reached from the entry points of the system under analysis. + \row + \li \inlineimage icons/axivion-mv.png + \li \uicontrol MV + \li Violations of metrics based on lines and tokens, + nesting, cyclomatic complexity, control flow, and so on. + \row + \li \inlineimage icons/axivion-sv.png + \li \uicontrol SV + \li Style violations, such as deviations from the naming + or coding conventions. + \endtable + + To clear the view, select \inlineimage icons/clean_pane_small.png + (\uicontrol Clear). + + To view issues, select \inlineimage icons/zoom.png + (\uicontrol {Search for Issues}). + + \section1 Filter issues + + \image qtcreator-axivion-issue-search.webp {Issues in Axivion view} + + To filter issues, select: + + \list + \li The icon of an issue type. + \li Two analyzed versions to compare. Select \uicontrol EMPTY to see + issues from the version you select in the right-side version box. + \li \inlineimage icons/arrowup.png to see only added issues. + \li \inlineimage icons/arrowdown.png to see only removed issues. + \li The owner of the issue. Select \uicontrol ANYBODY to see all issues, + \uicontrol NOBODY to see issues that are not associated with a user, + or a user name to see issues owned by a particular user. + \li Path patterns to show issues in the files in the directories that + match the pattern. + \endlist + + The information you see depends on the issue type. Double-click an issue + to see more information about it in the \uicontrol Axivion sidebar view. + + \section1 Jump to issues in the editor + + Typically, the details for cycles and clones show several paths. To view the + issues in the editor: + + \list + \li Click in a location column (that shows a file or line) to open the + respective location (if it can be found). + \li Click in other columns to open the first link in the issue details. + Usually, it leads to the \uicontrol {Left location} or + \uicontrol {Source location}. + \endlist + + The easiest way to jump to the \uicontrol {Right location} is to + select the link in the details or in the \uicontrol {Right Path} + or \uicontrol {Target Path} column. + + \sa {Enable and disable plugins}, {Link projects to Axivion dashboards}, + {Axivion} +*/ + +/*! + \page creator-preferences-axivion.html + \previouspage creator-reference.html + + \ingroup creator-reference-preferences + + \title Axivion + + \brief Create a connection to an Axivion dashboard server. + + Set preferences for the Axivion static code analysis tool in + \preferences > \uicontrol Axivion. + + \image qtcreator-preferences-axivion.webp {General tab in Axivion Preferences} + + To connect to an Axivion dashboard server: \list 1 - \li Select \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. + \li In \uicontrol Username, enter the username to access the server. \endlist - \section1 Linking to Dashboards + The first time you access the server, you must enter the password that + matches the username. It is stored safely in your keychain that is provided + by the OS for later use. - To link a project to a dashboard: + Select \uicontrol {Highlight marks} to highlight found issues on the + scrollbar in the editor. + + \sa {Enable and disable plugins}, {Link projects to Axivion dashboards}, + {Prevent code erosion} +*/ + +/*! + \page creator-link-axivion-dashboards.html + \previouspage creator-how-tos.html + + \ingroup creator-how-to-projects-configure + + \title Link projects to Axivion dashboards + + To link a project to an Axivion dashboard: \list 1 \li \uicontrol Projects > \uicontrol {Project Settings} > @@ -78,26 +193,5 @@ 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). - - \sa {Enable and disable plugins} + \sa {Enable and disable plugins}, {Prevent code erosion}, {Axivion} */ diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-overview.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-overview.qdoc index 27ff2fccff9..7902f219389 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-overview.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-overview.qdoc @@ -79,6 +79,7 @@ the project: \list + \li \l{Link projects to Axivion dashboards}{Axivion} \li \l{Specify clangd settings}{Clangd} \li \l{Speficy Clang tools settings}{Clang Tools} \li \l{Specify code style}{C++ Code Style} diff --git a/doc/qtcreator/src/qtcreator-toc.qdoc b/doc/qtcreator/src/qtcreator-toc.qdoc index 933fadb3a0e..c1b310e6c9c 100644 --- a/doc/qtcreator/src/qtcreator-toc.qdoc +++ b/doc/qtcreator/src/qtcreator-toc.qdoc @@ -102,7 +102,6 @@ \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}