mirror of
https://github.com/verilator/verilator.git
synced 2026-10-07 10:33:13 +02:00
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:
@@ -74,6 +74,14 @@ bool VString::wildmatch(const char* s, const char* p) {
|
||||
return (*s == '\0');
|
||||
}
|
||||
|
||||
bool VString::wildmatch(const string& s, const string& p) {
|
||||
return wildmatch(s.c_str(), p.c_str());
|
||||
}
|
||||
|
||||
bool VString::isWildcard(const string &p) {
|
||||
return ((p.find("*") != string::npos) || (p.find("?") != string::npos));
|
||||
}
|
||||
|
||||
string VString::dot(const string& a, const string& dot, const string& b) {
|
||||
if (b=="") return a;
|
||||
if (a=="") return b;
|
||||
|
||||
Reference in New Issue
Block a user