Lines Matching refs:line

113     they operate on a line-by-line basis.
119 opt_name = short name used to generate command-line options to
209 Line-by-line checks can simply provide a check_line() method
210 that returns True if the line is OK and False if it has an
211 error. Verifiers that need a multi-line view (like
223 Line-by-line fixes can simply provide a fix_line() method that
224 returns the fixed line. Verifiers that need a multi-line view
240 for num,line in enumerate(fobj):
243 line = line.rstrip('\n')
244 if not self.check_line(line, language=lang):
249 self.ui.write(">>%s<<\n" % line[:-1])
267 for i,line in enumerate(lines):
268 line = line.rstrip('\n')
270 line = self.fix_line(line, language=lang)
272 f.write(line)
278 def check_line(self, line, **kwargs):
282 def fix_line(self, line, **kwargs):
307 def check_line(self, line, language):
309 match = Whitespace._lead.search(line)
313 match = Whitespace._trail.search(line)
319 def fix_line(self, line, language):
320 if not self.skip_lead(language) and Whitespace._lead.search(line):
322 for i,c in enumerate(line):
329 newline += line[i:]
332 line = newline
334 return line.rstrip()
386 new = ''.join(line + '\n' for line in sort_lines)
391 for i,line in enumerate(sort_lines):
392 f.write(line)
406 def check_line(self, line, **kwargs):
407 match = ControlSpace._any_control.search(line)
410 def fix_line(self, line, **kwargs):
411 new_line = ControlSpace._any_control.sub(r'\1 (', line)
417 test_name = 'line length'
420 def check_line(self, line, **kwargs):
421 return style.normalized_len(line) <= 79
426 def fix_line(self, line):
437 def check_line(self, line, **kwargs):
438 return self.fix_line(line) == line
440 def fix_line(self, line, **kwargs):
441 return line.translate(None, ControlCharacters.invalid)
450 def check_line(self, line, **kwargs):
451 return self.regex.search(line) == None
453 def fix_line(self, line, **kwargs):
454 match = self.regex.search(line)
457 line = self.regex.sub('', line)
461 return line