Add lint_off -match waivers (#2102)

* Add more directives to configuration files

Allow to set the same directives in configuration files that can also
be set by comment attributes (such as /* verilator public */ etc).

* Add support for lint messsage waivers

Add configuration file switch '-match' for lint_off. It takes a string
with wildcards allowed and warnings will be matched against it (if
rule and file also match). If it matches, the warning is waived.

Fixes #1649 and #1514 
Closes #2072
This commit is contained in:
Stefan Wallentowitz
2020-01-12 10:03:17 +01:00
committed by GitHub
parent 98fb7ec193
commit fad465abf1
89 changed files with 1676 additions and 294 deletions
+19
View File
@@ -28,6 +28,7 @@
#include "V3Global.h"
#include "V3LinkParse.h"
#include "V3Ast.h"
#include "V3Config.h"
#include <algorithm>
#include <cstdarg>
@@ -106,6 +107,8 @@ private:
// VISITs
virtual void visit(AstNodeFTask* nodep) {
V3Config::applyFTask(m_modp, nodep);
if (!nodep->user1SetOnce()) { // Process only once.
cleanFileline(nodep);
m_ftaskp = nodep;
@@ -189,6 +192,9 @@ private:
return;
}
// Maybe this variable has a signal attribute
V3Config::applyVarAttr(m_modp, m_ftaskp, nodep);
if (v3Global.opt.publicFlatRW()) {
switch (nodep->varType()) {
case AstVarType::VAR:
@@ -438,6 +444,8 @@ private:
}
virtual void visit(AstNodeModule* nodep) {
V3Config::applyModule(nodep);
// Module: Create sim table for entire module and iterate
cleanFileline(nodep);
//
@@ -474,6 +482,17 @@ private:
visitIterateNoValueMod(nodep);
}
virtual void visit(AstBegin* nodep) {
V3Config::applyCoverageBlock(m_modp, nodep);
cleanFileline(nodep);
iterateChildren(nodep);
}
virtual void visit(AstCase* nodep) {
V3Config::applyCase(nodep);
cleanFileline(nodep);
iterateChildren(nodep);
}
virtual void visit(AstNode* nodep) {
// Default: Just iterate
cleanFileline(nodep);