forked from qt-creator/qt-creator
Allow users to suppress diagnostics.
This patch deals with what is likely the most common use case: Filtering specific messages at a particular location. The current granularity is essentially per-file (and per-function, where possible), which seems more useful than taking line numbers into account, as that would not be robust with regards to code changes elsewhere in the file. We can fine-tune this if the need arises. Change-Id: I4e9b2671fa199339cc3b995953d072b840cd3205 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "clangstaticanalyzerplugin.h"
|
||||
|
||||
#include "clangstaticanalyzerconfigwidget.h"
|
||||
#include "clangstaticanalyzerprojectsettingswidget.h"
|
||||
#include "clangstaticanalyzerruncontrolfactory.h"
|
||||
#include "clangstaticanalyzertool.h"
|
||||
|
||||
@@ -35,6 +36,7 @@
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
#include <licensechecker/licensecheckerplugin.h>
|
||||
#include <projectexplorer/projectpanelfactory.h>
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
|
||||
@@ -106,6 +108,12 @@ bool ClangStaticAnalyzerPlugin::initialize(const QStringList &arguments, QString
|
||||
// In the initialize method, a plugin can be sure that the plugins it
|
||||
// depends on have initialized their members.
|
||||
|
||||
auto panelFactory = new ProjectExplorer::ProjectPanelFactory();
|
||||
panelFactory->setPriority(100);
|
||||
panelFactory->setDisplayName(tr("Clang Static Analyzer Settings"));
|
||||
panelFactory->setSimpleCreateWidgetFunction<ProjectSettingsWidget>(QIcon());
|
||||
ProjectExplorer::ProjectPanelFactory::registerFactory(panelFactory);
|
||||
|
||||
LicenseChecker::LicenseCheckerPlugin *licenseChecker
|
||||
= ExtensionSystem::PluginManager::getObject<LicenseChecker::LicenseCheckerPlugin>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user