Internals: Refactor some V3Error code handling and add tests. No functional change intended.

This commit is contained in:
Wilson Snyder
2025-12-29 18:17:24 -05:00
parent 4775399716
commit 2e394c3c04
15 changed files with 121 additions and 49 deletions
+5 -6
View File
@@ -445,12 +445,11 @@ public:
bool waive(V3ErrorCode code, const string& message) {
if (code.hardError()) return false;
for (const auto& itr : m_waivers) {
if ((code.isUnder(itr.m_code) || (itr.m_code == V3ErrorCode::I_LINT)))
if ((code.isUnder(itr.m_code) || (itr.m_code == V3ErrorCode::I_LINT))
&& VString::wildmatch(message, itr.m_match)
&& WildcardContents::resolve(itr.m_contents)) {
return true;
}
if ((code.isUnder(itr.m_code) || (itr.m_code == V3ErrorCode::I_LINT))
&& VString::wildmatch(message, itr.m_match)
&& WildcardContents::resolve(itr.m_contents)) {
return true;
}
}
return false;
}