def GetErrorOutput(error, new_error=False):

  line = ''
  if error.token:
    line = 'Line %d, ' % error.token.line_number

  code = 'E:%04d' % error.code

  error_message = error.message
  if new_error:
    error_message = 'New Error ' + error_message

  return '%s%s: %s' % (line, code, error.message)
Get a output line for an error in regular format.
dataset/ETHPy150Open google/closure-linter/closure_linter/common/erroroutput.py/GetErrorOutput