Plugins/CheckerPlugins/CodeStyleChecker/DocStyleChecker.py

changeset 3585
f09a457c83fe
parent 3582
49f9c3695ef5
child 3587
e2f10b5fd032
equal deleted inserted replaced
3583:3e8e0346d639 3585:f09a457c83fe
1233 firstWord = summary.strip().split(None, 1)[0].lower() 1233 firstWord = summary.strip().split(None, 1)[0].lower()
1234 if functionName == '__init__': 1234 if functionName == '__init__':
1235 if firstWord != 'constructor': 1235 if firstWord != 'constructor':
1236 self.__error(docstringContext.start() + lineNumber, 0, 1236 self.__error(docstringContext.start() + lineNumber, 0,
1237 "D232", 'constructor') 1237 "D232", 'constructor')
1238 elif functionName.startswith('__'): 1238 elif functionName.startswith(('__', 'on_')):
1239 if firstWord != 'private': 1239 if firstWord != 'private':
1240 self.__error(docstringContext.start() + lineNumber, 0, 1240 self.__error(docstringContext.start() + lineNumber, 0,
1241 "D232", 'private') 1241 "D232", 'private')
1242 elif functionName.startswith('_'): 1242 elif functionName.startswith('_') or \
1243 functionName.endswith('Event'):
1243 if firstWord != 'protected': 1244 if firstWord != 'protected':
1244 self.__error(docstringContext.start() + lineNumber, 0, 1245 self.__error(docstringContext.start() + lineNumber, 0,
1245 "D232", 'protected') 1246 "D232", 'protected')
1246 else: 1247 else:
1247 if firstWord != 'public': 1248 if firstWord != 'public':

eric ide

mercurial