wpiformat/wpiformat/cpplint.py
def ProcessFile(filename):
  """Does google-lint on a single file.

  Args:
    filename: The name of the file to parse.
  """

  # Note that
  # we are not opening the file with universal newline support
  # (which codecs doesn't support anyway), so the resulting lines do
  # contain trailing '\r' characters if we are reading a file that
  # has CRLF endings.
  # If after the split a trailing '\r' is present, it is removed
  # below.
  lines = codecs.open(filename, 'r', 'utf8', 'replace').read().split('\n')

  # Remove trailing '\r'.
  # The -1 accounts for the extra trailing blank line we get from split()
  for linenum in range(len(lines) - 1):
    if lines[linenum].endswith('\r'):
      lines[linenum] = lines[linenum].rstrip('\r')

  is_header = IsHeaderFile(filename)

  ProcessFileData(filename, is_header, lines, Error)
Does google-lint on a single file.

  Args:
    filename: The name of the file to parse.
  
Does google-lint on a single file.
Does google - lint on a single file .
def ProcessFile(filename):
  lines = codecs.open(filename, 'r', 'utf8', 'replace').read().split('\n')
  for linenum in range(len(lines) - 1):
    if lines[linenum].endswith('\r'):
      lines[linenum] = lines[linenum].rstrip('\r')
  is_header = IsHeaderFile(filename)
  ProcessFileData(filename, is_header, lines, Error)
def ProcessFile ( filename ) : lines = codecs . open ( filename , 'r' , 'utf8' , 'replace' ) . read ( ) . split ( '\n' ) for linenum in range ( len ( lines ) - 1 ) : if lines [ linenum ] . endswith ( '\r' ) : lines [ linenum ] = lines [ linenum ] . rstrip ( '\r' ) is_header = IsHeaderFile ( filename ) ProcessFileData ( filename , is_header , lines , Error )
Does google-lint on a single file.
Does google - lint on a single file .
"""Does google-lint on a single file.

  Args:
    filename: The name of the file to parse.
  """ # Note that # we are not opening the file with universal newline support # (which codecs doesn't support anyway), so the resulting lines do # contain trailing '\r' characters if we are reading a file that # has CRLF endings. # If after the split a trailing '\r' is present, it is removed # below. # Remove trailing '\r'. # The -1 accounts for the extra trailing blank line we get from split()
filename
The name of the file to parse.
The name of the file to parse .