Plugins/PluginCodeStyleChecker.py

changeset 6264
04a671fa4adb
parent 6048
82ad8ec9548c
child 6645
ad476851d7e0
equal deleted inserted replaced
6263:4dd53711d869 6264:04a671fa4adb
159 def styleCheck(self, lang, filename, source, args): 159 def styleCheck(self, lang, filename, source, args):
160 """ 160 """
161 Public method to prepare a style check on one Python source file. 161 Public method to prepare a style check on one Python source file.
162 162
163 @param lang language of the file or None to determine by internal 163 @param lang language of the file or None to determine by internal
164 algorithm (str or None) 164 algorithm
165 @param filename source filename (string) 165 @type str or None
166 @param source string containing the code to check (string) 166 @param filename source filename
167 @type str
168 @param source string containing the code to check
169 @type str
167 @param args arguments used by the codeStyleCheck function (list of 170 @param args arguments used by the codeStyleCheck function (list of
168 excludeMessages (str), includeMessages (str), repeatMessages 171 excludeMessages, includeMessages, repeatMessages, fixCodes,
169 (bool), fixCodes (str), noFixCodes (str), fixIssues (bool), 172 noFixCodes, fixIssues, maxLineLength, blankLines, hangClosing,
170 maxLineLength (int), hangClosing (bool), docType (str), errors 173 docType, codeComplexityArgs, miscellaneousArgs, errors, eol,
171 (list of str), eol (str), encoding (str)) 174 encoding, backup)
175 @type list of (str, str, bool, str, str, bool, int, list of (int, int),
176 bool, str, dict, dict, list of str, str, str, bool)
172 """ 177 """
173 if lang is None: 178 if lang is None:
174 lang = 'Python{0}'.format(determinePythonVersion(filename, source)) 179 lang = 'Python{0}'.format(determinePythonVersion(filename, source))
175 if lang not in ['Python2', 'Python3']: 180 if lang not in ['Python2', 'Python3']:
176 return 181 return
183 Public method to prepare a style check on multiple Python source files. 188 Public method to prepare a style check on multiple Python source files.
184 189
185 @param argumentsList list of arguments tuples with each tuple 190 @param argumentsList list of arguments tuples with each tuple
186 containing filename, source and args as given in styleCheck() 191 containing filename, source and args as given in styleCheck()
187 method 192 method
193 @type list of tuple of (str, str, list)
188 """ 194 """
189 data = { 195 data = {
190 "Python2": [], 196 "Python2": [],
191 "Python3": [], 197 "Python3": [],
192 } 198 }

eric ide

mercurial