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

Function evalExpr

addons/namingng.py:156–166  ·  view source on GitHub ↗
(conf, exp, mockToken, msgType)

Source from the content-addressed store, hash-verified

154
155
156def evalExpr(conf, exp, mockToken, msgType):
157 report_as_error = False
158 msg = msgType + ' ' + mockToken.str + ' violates naming convention'
159
160 if isinstance(conf, dict):
161 report_as_error = conf[exp][0]
162 msg += ': ' + conf[exp][1]
163
164 res = re.match(exp,mockToken.str)
165 if bool(res) == report_as_error:
166 reportNamingError(mockToken,msg)
167
168def check_include_guard_name(conf,directive):
169 parts = directive.str.split()

Callers 5

check_namespace_namingFunction · 0.85
check_variable_namingFunction · 0.85
check_gpp_namingFunction · 0.85
check_function_namingFunction · 0.85
check_class_namingFunction · 0.85

Calls 2

reportNamingErrorFunction · 0.85
matchMethod · 0.45

Tested by

no test coverage detected