reportInvalidOverrides = (
  compartmentMap,
  { policyOverride, policyOverridePath, log = defaultLog }
) => {
  if (!policyOverride) {
    return
  }

  const canonicalNames = new Set(
    values(compartmentMap.compartments).map(({ label }) => label)
  )
  // TODO: use `Set.prototype.difference` once widely available
  const invalidOverrides = keys(policyOverride.resources).filter(
    (key) => !canonicalNames.has(key)
  )

  if (invalidOverrides.length) {
    let msg = `The following resource(s) provided in policy overrides`
    msg += policyOverridePath ? ` (${hrPath(policyOverridePath)})` : ''
    msg += ` were not found and may be invalid:\n`
    msg += invalidOverrides
      .map((invalidOverride) => `  - ${hrLabel(invalidOverride)}`)
      .join('\n')
    log.warning(msg)
  }
}
Reports policy override resources which weren't found on disk and are thus
not in the compartment map descriptor.

@param {CompartmentMapDescriptor} compartmentMap
@param {ReportInvalidOverridesOptions} options
@returns {void}