code: function sortMessages(messages) {
    var fileArray = {
      error: [],
      warning: []
    };
  
    messages.forEach(function (message) {
      if (message.severity === 1) {
        fileArray.warning.push(message);
      } else {
        fileArray.error.push(message);
      }
    });
  
    return lodash.concat(fileArray.error, fileArray.warning);
  }
docs: Sorts the result files after severity in following order:
  
  - Error
  - Warning
  
  @param {Array}   messages  Messages.
  @returns {Array}           Sorted messages.