MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / executeCheck

Method executeCheck

addons/misra.py:4641–4666  ·  view source on GitHub ↗

Execute check function for a single MISRA rule. :param rule_num: Number of rule in hundreds format :param check_function: Check function to execute :param args: Check function arguments

(self, rule_num, check_function, *args)

Source from the content-addressed store, hash-verified

4639 print(*args, **kwargs)
4640
4641 def executeCheck(self, rule_num, check_function, *args):
4642 """Execute check function for a single MISRA rule.
4643
4644 :param rule_num: Number of rule in hundreds format
4645 :param check_function: Check function to execute
4646 :param args: Check function arguments
4647 """
4648 if not self.isRuleGloballySuppressed(rule_num):
4649 misra_cpp = (
4650 202, # misra-c2012-2.3 : misra c++2008 0-1-9
4651 203, # misra-c2012-2.3 : misra c++2008 0-1-5
4652 402, # misra-c2012-4.2 : misra c++2008 2-3-1
4653 701, # misra-c2012-7.1 : misra c++2008 2-3-1
4654 702, # misra-c2012-7.2 : misra c++2008 2-13-2
4655 1203, # misra-c2012-12.3 : misra c++2008 5-14-1
4656 1204, # misra-c2012-12.4 : misra c++2008 5-18-1
4657 1305, # misra-c2012-13.5 : misra c++2008 5-19-1
4658 1702, # misra-c2012-17.2 : misra c++2008 7-5-4
4659 1901) # misra-c2012-19.1 : misra c++2008 2-13-3
4660
4661 if (not self.is_cpp) or rule_num in misra_cpp:
4662 # log checker
4663 errmsg = 'Misra C: %i.%i' % (rule_num // 100, rule_num % 100)
4664 cppcheckdata.log_checker(errmsg, 'misra')
4665
4666 check_function(*args)
4667
4668 def parseDump(self, dumpfile, path_premium_addon=None):
4669 def fillVerifyExpected(verify_expected, tok):

Callers 1

parseDumpMethod · 0.95

Calls 1

Tested by

no test coverage detected