function hasKnownHeaders() {
			const headers = docMarkdown
				.filter(token => token.type === "heading" && token.depth === 2)
				.map(header => header.text);

			for (const header of headers) {
				if (!knownHeaders.includes(header)) {
					return false;
				}
			}

			/*
			 * Check only the subset of used headers for the correct order
			 */
			const presentHeaders = knownHeaders.filter(header =>
				headers.includes(header),
			);

			for (let i = 0; i < presentHeaders.length; ++i) {
				if (presentHeaders[i] !== headers[i]) {
					return false;
				}
			}

			return true;
		}
Check if all H2 headers are known and in the expected order
Only H2 headers are checked as H1 and H3 are variable and/or rule specific.
@returns {boolean} true if all headers are known and in the right order