Plugins/CheckerPlugins/CodeStyleChecker/NamingStyleChecker.py

changeset 5585
dab20c39f08c
parent 5389
9b1c800daff3
child 5589
ad8f37c6a306
equal deleted inserted replaced
5584:9fce9cfcbfda 5585:dab20c39f08c
49 "classdef": [ 49 "classdef": [
50 (self.__checkClassName, ("N801",)), 50 (self.__checkClassName, ("N801",)),
51 (self.__checkNameToBeAvoided, ("N831",)), 51 (self.__checkNameToBeAvoided, ("N831",)),
52 ], 52 ],
53 "functiondef": [ 53 "functiondef": [
54 (self.__checkFuntionName, ("N802",)), 54 (self.__checkFunctionName, ("N802",)),
55 (self.__checkFunctionArgumentNames, 55 (self.__checkFunctionArgumentNames,
56 ("N803", "N804", "N805", "N806")), 56 ("N803", "N804", "N805", "N806")),
57 (self.__checkNameToBeAvoided, ("N831",)), 57 (self.__checkNameToBeAvoided, ("N831",)),
58 ], 58 ],
59 "assign": [ 59 "assign": [
289 (integer, integer, string) 289 (integer, integer, string)
290 """ 290 """
291 if not self.CamelcaseRegexp.match(node.name): 291 if not self.CamelcaseRegexp.match(node.name):
292 yield self.__error(node, "N801") 292 yield self.__error(node, "N801")
293 293
294 def __checkFuntionName(self, node, parents): 294 def __checkFunctionName(self, node, parents):
295 """ 295 """
296 Private class to check the given node for function name 296 Private class to check the given node for function name
297 conventions (N802). 297 conventions (N802).
298 298
299 Function names should be lowercase, with words separated by underscores 299 Function names should be lowercase, with words separated by underscores

eric ide

mercurial