compilerplugins: try to disable ostr plugin for tests using assertXPath

... on release branch.

Change-Id: Ibd22c1e12d4566b153887627758ed6d5e19a5f79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176951
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
This commit is contained in:
Michael Stahl 2024-11-21 17:37:02 +01:00
parent 7d7d3afcf6
commit e14928b148

View file

@ -37,6 +37,32 @@ public:
void run() override
{
std::string fn(handler.getMainFileName());
loplugin::normalizeDotDotInFilePath(fn);
if (loplugin::hasPathnamePrefix(fn, SRCDIR "/chart2/qa/")
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/embeddedobj/qa/")
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/emfio/qa/")
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/extensions/qa/")
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/filter/qa/")
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/oox/qa/")
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/package/qa/")
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/sc/qa/")
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/sd/qa/")
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/sdext/qa/")
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/sfx2/qa/")
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/starmath/qa/")
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/svgio/qa/")
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/svx/qa/")
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/sw/qa/")
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/vcl/qa/")
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/writerperfect/qa/")
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/xmloff/qa/")
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/xmlscript/qa/")
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/xmlsecurity/qa/"))
{
return; // ignore unit tests in release branch
}
if (compiler.getLangOpts().CPlusPlus
&& TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()))
{