function parseYAML(filename, contents) {
  try {
    return jsYaml.safeLoad(contents);
  } catch (ex) {
    let msg = 'Unable to parse YAML';
    if (ex.reason) {
      msg = ex.reason;
    }
    let position = ex.mark;
    if (position && position.line) {
      position.line++;
    }
    logError(filename, position, msg, ex);
  }
  return null;
}
Parses a YAML file
  Note: The returned promise always resolves, it will never reject.

@param {string} filename The name of the file to be tested
@param {string} contents The contents of the file to be tested
@return {Object} The parsed YAML object