(conf,cfg,debugprint)
| 344 | evalExpr(conf_list, exp, mockToken, message) |
| 345 | |
| 346 | def check_function_naming(conf,cfg,debugprint): |
| 347 | for token in cfg.tokenlist: |
| 348 | if not token.function: |
| 349 | continue |
| 350 | if token.function.type in ('Constructor', 'Destructor', 'CopyConstructor', 'MoveConstructor'): |
| 351 | continue |
| 352 | retval = token.previous.str |
| 353 | prev = token.previous |
| 354 | while "*" in retval and len(retval.replace("*", "")) == 0: |
| 355 | prev = prev.previous |
| 356 | retval = prev.str + retval |
| 357 | if debugprint: |
| 358 | print("\t:: {} {}".format(retval, token.function.name)) |
| 359 | |
| 360 | if retval and retval in conf.function_prefixes: |
| 361 | if not token.function.name.startswith(conf.function_prefixes[retval]): |
| 362 | reportNamingError(token, 'Function ' + token.function.name + ' violates naming convention', column=token.column) |
| 363 | mockToken = DataStruct(token.file, token.linenr, token.function.name, token.column) |
| 364 | msgType = 'Function' |
| 365 | for exp in conf.function_name: |
| 366 | evalExpr(conf.function_name, exp, mockToken, msgType) |
| 367 | |
| 368 | def check_class_naming(conf,cfg): |
| 369 | for fnc in cfg.functions: |
no test coverage detected