Home | History | Annotate | Download | only in tools

Lines Matching refs:line

20   """Sanitizes source files with the specified file and line modifiers.
27 line_modifiers: list - line-modification methods which should be applied to
46 line_number = 0 # Keeps track of line numbers in the source file.
49 # Run the line modifiers for each line in this file.
50 for line in lines:
51 original_line = line
55 line = modifier(line, full_item_path, line_number)
56 if original_line != line:
58 new_lines.append(line)
82 ############## Line Modification methods ##############
85 def TrailingWhitespaceRemover(line, file_path, line_number):
86 """Strips out trailing whitespaces from the specified line."""
87 stripped_line = line.rstrip() + '\n'
88 if line != stripped_line:
93 def CrlfReplacer(line, file_path, line_number):
95 if '\r\n' in line:
97 return line.replace('\r\n', '\n')
100 def TabReplacer(line, file_path, line_number):
102 if '\t' in line:
104 return line.replace('\t', ' ')