mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 18:13:50 +02:00
Generate file with waivers (#2354)
This adds the flag --generate-waivefile <filename>. This will generate a verilator config file with the proper lint_off statemens to turn off warnings emitted during this particular run. This feature can be used to start with using Verilator as linter and systematically capture all known lint warning for further elimination. It hopefully helps people turning of -Wno-fatal or -Wno-lint and gradually improve their code base. Signed-off-by: Stefan Wallentowitz <[email protected]>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
# include "V3Config.h"
|
||||
# include "V3File.h"
|
||||
#endif
|
||||
#include "V3Waiver.h"
|
||||
// clang-format on
|
||||
|
||||
#include <algorithm>
|
||||
@@ -366,6 +367,7 @@ void FileLine::v3errorEnd(std::ostringstream& sstr, const string& locationStr) {
|
||||
} else if (!V3Error::errorContexted()) {
|
||||
nsstr << warnContextPrimary();
|
||||
}
|
||||
if (!m_waive) { V3Waiver::addEntry(V3Error::errorCode(), filename(), sstr.str()); }
|
||||
V3Error::v3errorEnd(nsstr, lstr.str());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user