async function checkFile(filename) {
	let fatalErrorCount = 0,
		problems;

	try {
		problems = await findProblems(filename);
	} catch (error) {
		fatalErrorCount = 1;
		problems = [
			{
				fatal: true,
				severity: 2,
				message: `Error checking file: ${error.message}`,
			},
		];
	}
	return {
		filePath: filename,
		errorCount: problems.length,
		warningCount: 0,
		fatalErrorCount,
		messages: problems,
	};
}
Checks the example code blocks in a rule documentation file.
@param {string} filename The file to be checked.
@returns {Promise<LintResult>} The result of checking the file.