index.js
function formatResult (result) {
  return [
    '<file name="' + result.filename + '">',
    result.messages.map(formatMessage).join('\n'),
    '</file>'
  ].join('\n')
}
function formatResult (result) {
  return [
    '<file name="' + result.filename + '">',
    result.messages.map(formatMessage).join('\n'),
    '</file>'
  ].join('\n')
}
function formatResult ( result ) { return [ '<file name="' + result . filename + '">' , result . messages . map ( formatMessage ) . join ( '\n' ) , '</file>' ] . join ( '\n' ) }
Format results for a single file.

@param {object} result Results for a single file
@param {string} result.filename Filename for these results
@param {object[]} result.messages Warnings/errors for file
@return {string} XML representation for file and results
Format results for a single file .