forked from qt-creator/qt-creator
QmlJS: Allow disabling static analyzer messages
Provide settings to define a customized set of enabled static analyzer messages. Fixes: QTCREATORBUG-29095 Change-Id: Id629e383dd9e3beeef98026759ac66716dc43d23 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
#include <QSet>
|
||||
#include <QStack>
|
||||
|
||||
namespace Utils { class QtcSettings; }
|
||||
|
||||
namespace QmlJS {
|
||||
|
||||
class Imports;
|
||||
@@ -22,7 +24,7 @@ class QMLJS_EXPORT Check: protected AST::Visitor
|
||||
|
||||
public:
|
||||
// prefer taking root scope chain?
|
||||
Check(Document::Ptr doc, const ContextPtr &context);
|
||||
Check(Document::Ptr doc, const ContextPtr &context, Utils::QtcSettings *qtcSettings = nullptr);
|
||||
~Check();
|
||||
|
||||
QList<StaticAnalysis::Message> operator()();
|
||||
@@ -31,11 +33,13 @@ public:
|
||||
void disableMessage(StaticAnalysis::Type type);
|
||||
|
||||
void enableQmlDesignerChecks();
|
||||
void disableQmlDesignerChecks();
|
||||
|
||||
void enableQmlDesignerUiFileChecks();
|
||||
void disableQmlDesignerUiFileChecks();
|
||||
|
||||
static QList<StaticAnalysis::Type> defaultDisabledMessages();
|
||||
static QList<StaticAnalysis::Type> defaultDisabledMessagesForNonQuickUi();
|
||||
|
||||
protected:
|
||||
bool preVisit(AST::Node *ast) override;
|
||||
void postVisit(AST::Node *ast) override;
|
||||
|
||||
Reference in New Issue
Block a user