From 1584e6236758d54b0d246d41771d67338e0bd41b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Thu, 6 Jun 2019 15:38:15 +0200 Subject: [PATCH] cppcheckdata: Added 'simpleMatch' function --- addons/cppcheckdata.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/addons/cppcheckdata.py b/addons/cppcheckdata.py index 6665586db..c8307797b 100755 --- a/addons/cppcheckdata.py +++ b/addons/cppcheckdata.py @@ -802,6 +802,14 @@ def ArgumentParser(): return parser +def simpleMatch(token, pattern): + for p in pattern.split(' '): + if not token or token.str != p: + return False + token = token.next + return True + + def reportError(location, severity, message, addon, errorId): if '--cli' in sys.argv: errout = sys.stdout