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

branch
eric7
changeset 11147
dee6e106b4d3
parent 11090
f5f5f5803935
equal deleted inserted replaced
11146:59e04f7003e9 11147:dee6e106b4d3
26 list of codes 26 list of codes
27 @rtype dict 27 @rtype dict
28 """ 28 """
29 return { 29 return {
30 "Str": [ 30 "Str": [
31 (checkHardcodedTmpDirectory, ("S108",)), 31 (checkHardcodedTmpDirectory, ("S-108",)),
32 ], 32 ],
33 } 33 }
34 34
35 35
36 def checkHardcodedTmpDirectory(reportError, context, config): 36 def checkHardcodedTmpDirectory(reportError, context, config):
52 52
53 if any(context.stringVal.startswith(s) for s in tmpDirs): 53 if any(context.stringVal.startswith(s) for s in tmpDirs):
54 reportError( 54 reportError(
55 context.node.lineno - 1, 55 context.node.lineno - 1,
56 context.node.col_offset, 56 context.node.col_offset,
57 "S108", 57 "S-108",
58 "M", 58 "M",
59 "M", 59 "M",
60 ) 60 )

eric ide

mercurial