function verifyText({
	text,
	cwd,
	filePath: providedFilePath,
	config,
	fix,
	allowInlineConfig,
	reportUnusedDisableDirectives,
	fileEnumerator,
	linter,
}) {
	const filePath = providedFilePath || "<text>";

	debug(`Lint ${filePath}`);

	/*
	 * Verify.
	 * `config.extractConfig(filePath)` requires an absolute path, but `linter`
	 * doesn't know CWD, so it gives `linter` an absolute path always.
	 */
	const filePathToVerify =
		filePath === "<text>" ? path.join(cwd, filePath) : filePath;
	const { fixed, messages, output } = linter.verifyAndFix(text, config, {
		allowInlineConfig,
		filename: filePathToVerify,
		fix,
		reportUnusedDisableDirectives,

		/**
		 * Check if the linter should adopt a given code block or not.
		 * @param {string} blockFilename The virtual filename of a code block.
		 * @returns {boolean} `true` if the linter should adopt the code block.
		 */
		filterCodeBlock(blockFilename) {
			return fileEnumerator.isTargetPath(blockFilename);
		},
	});

	// Tweak and return.
	const result = {
		filePath,
		messages,
		suppressedMessages: linter.getSuppressedMessages(),
		...calculateStatsPerFile(messages),
	};

	if (fixed) {
		result.output = output;
	}
	if (
		result.errorCount + result.warningCount > 0 &&
		typeof result.output === "undefined"
	) {
		result.source = text;
	}

	return result;
}
Processes an source code using ESLint.
@param {Object} config The config object.
@param {string} config.text The source code to verify.
@param {string} config.cwd The path to the current working directory.
@param {string|undefined} config.filePath The path to the file of `text`. If this is undefined, it uses `<text>`.
@param {ConfigArray} config.config The config.
@param {boolean} config.fix If `true` then it does fix.
@param {boolean} config.allowInlineConfig If `true` then it uses directive comments.
@param {boolean|string} config.reportUnusedDisableDirectives If `true`, `"error"` or '"warn"', then it reports unused `eslint-disable` comments.
@param {FileEnumerator} config.fileEnumerator The file enumerator to check if a path is a target or not.
@param {Linter} config.linter The linter instance to verify.
@returns {LintResult} The result of linting.
@private