function checkScope(scope) {
			const undefinedVar = scope.set.get("undefined");

			if (!undefinedVar) {
				return;
			}

			const references = undefinedVar.references;

			const defs = undefinedVar.defs;

			// Report non-initializing references (those are covered in defs below)
			references
				.filter(ref => !ref.init)
				.forEach(ref => report(ref.identifier));

			defs.forEach(def => report(def.name));
		}
Checks the given scope for references to `undefined` and reports
all references found.
@param {eslint-scope.Scope} scope The scope to check.
@returns {void}