31 (checkJinja2Autoescape, ("S701",)), |
31 (checkJinja2Autoescape, ("S701",)), |
32 ], |
32 ], |
33 } |
33 } |
34 |
34 |
35 |
35 |
36 def checkJinja2Autoescape(reportError, context, config): # noqa: U100 |
36 def checkJinja2Autoescape(reportError, context, _config): |
37 """ |
37 """ |
38 Function to check for not auto escaping in jinja2. |
38 Function to check for not auto escaping in jinja2. |
39 |
39 |
40 @param reportError function to be used to report errors |
40 @param reportError function to be used to report errors |
41 @type func |
41 @type func |
42 @param context security context object |
42 @param context security context object |
43 @type SecurityContext |
43 @type SecurityContext |
44 @param config dictionary with configuration data |
44 @param _config dictionary with configuration data (unused) |
45 @type dict |
45 @type dict |
46 """ |
46 """ |
47 if isinstance(context.callFunctionNameQual, str): |
47 if isinstance(context.callFunctionNameQual, str): |
48 qualnameList = context.callFunctionNameQual.split(".") |
48 qualnameList = context.callFunctionNameQual.split(".") |
49 func = qualnameList[-1] |
49 func = qualnameList[-1] |