Clang: Add links to web pages in Clang-Tidy configuration

Each Clang-Tidy check get the separate link except
clang-analyzer which has only a whole group page.

Change-Id: I0b63cce8475109812280d9d44ac2d36aaa66e03b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Ivan Donchevskii
2018-05-29 14:38:57 +02:00
parent 2defef3d6f
commit 95aa52707d
4 changed files with 72 additions and 17 deletions

View File

@@ -28,6 +28,8 @@
#include <coreplugin/editormanager/editormanager.h>
#include <cpptools/cpptoolsconstants.h>
#include <utils/qtcassert.h>
#include <utils/tooltip/tooltip.h>
@@ -46,14 +48,8 @@ namespace {
// CLANG-UPGRADE-CHECK: Checks/update URLs.
//
// For tidy, upgrade the version in the URL. Note that we cannot use the macro
// CLANG_VERSION here because it might denote a version that was not yet
// released (e.g. 6.0.1, but only 6.0.0 was released).
//
// For clazy, once it gets dedicated documentation pages for released versions,
// Once it gets dedicated documentation pages for released versions,
// use them instead of pointing to master, as checks might vanish.
const char TIDY_DOCUMENTATION_URL_TEMPLATE[]
= "https://releases.llvm.org/6.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/%1.html";
const char CLAZY_DOCUMENTATION_URL_TEMPLATE[]
= "https://github.com/KDE/clazy/blob/master/docs/checks/README-%1.md";
@@ -283,7 +279,7 @@ private:
return QString();
// Clang-Tidy
return QString::fromUtf8(TIDY_DOCUMENTATION_URL_TEMPLATE).arg(option);
return QString::fromUtf8(CppTools::Constants::TIDY_DOCUMENTATION_URL_TEMPLATE).arg(option);
}
static QString maybeClickableOption(const Utf8String &option)