11146:59e04f7003e9 | 11147:dee6e106b4d3 |
---|---|
24 list of codes | 24 list of codes |
25 @rtype dict | 25 @rtype dict |
26 """ | 26 """ |
27 return { | 27 return { |
28 "Call": [ | 28 "Call": [ |
29 (checkMakoTemplateUsage, ("S702",)), | 29 (checkMakoTemplateUsage, ("S-702",)), |
30 ], | 30 ], |
31 } | 31 } |
32 | 32 |
33 | 33 |
34 def checkMakoTemplateUsage(reportError, context, _config): | 34 def checkMakoTemplateUsage(reportError, context, _config): |
49 # unlike Jinja2, mako does not have a template wide autoescape | 49 # unlike Jinja2, mako does not have a template wide autoescape |
50 # feature and thus each variable must be carefully sanitized. | 50 # feature and thus each variable must be carefully sanitized. |
51 reportError( | 51 reportError( |
52 context.node.lineno - 1, | 52 context.node.lineno - 1, |
53 context.node.col_offset, | 53 context.node.col_offset, |
54 "S702", | 54 "S-702", |
55 "M", | 55 "M", |
56 "H", | 56 "H", |
57 ) | 57 ) |