src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/yamlLoad.py

branch
eric7
changeset 11147
dee6e106b4d3
parent 11090
f5f5f5803935
equal deleted inserted replaced
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 (checkYamlLoad, ("S506",)), 29 (checkYamlLoad, ("S-506",)),
30 ], 30 ],
31 } 31 }
32 32
33 33
34 def checkYamlLoad(reportError, context, _config): 34 def checkYamlLoad(reportError, context, _config):
57 not context.checkCallArgValue("Loader", "CSafeLoader"), 57 not context.checkCallArgValue("Loader", "CSafeLoader"),
58 context.getCallArgAtPosition(1) != "SafeLoader", 58 context.getCallArgAtPosition(1) != "SafeLoader",
59 context.getCallArgAtPosition(1) != "CSafeLoader", 59 context.getCallArgAtPosition(1) != "CSafeLoader",
60 ] 60 ]
61 ): 61 ):
62 reportError(context.node.lineno - 1, context.node.col_offset, "S506", "M", "H") 62 reportError(context.node.lineno - 1, context.node.col_offset, "S-506", "M", "H")

eric ide

mercurial