91e75e620b
CI: cua-driver distro-compat matrix / Resolve release version (push) Waiting to run
CI: cua-driver distro-compat matrix / debian:12 (glibc 2.36) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / fedora:41 (glibc 2.40) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / rockylinux:9 (glibc 2.34) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / ubuntu:22.04 (glibc 2.35) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / ubuntu:24.04 (glibc 2.39) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / Distro compat summary (push) Blocked by required conditions
CI: Nix Linux Rust source / Nix / compositor build (push) Waiting to run
CI: Nix Linux Rust source / Nix / driver package (push) Waiting to run
CI: Nix Linux Rust source / Nix / Rust unit tests (push) Waiting to run
CI: Rust Linux unit / Rust Linux unit and compile (push) Waiting to run
CI: Rust Windows unit / Rust Windows unit and compile (push) Waiting to run
CI: SPDX Headers / Check SPDX headers (warn-only) (push) Waiting to run
CD: Docs MCP Server / build (linux/amd64) (push) Waiting to run
CD: Docs MCP Server / build (linux/arm64) (push) Waiting to run
CD: Docs MCP Server / merge (push) Blocked by required conditions
53 lines
1.7 KiB
TypeScript
53 lines
1.7 KiB
TypeScript
#!/usr/bin/env npx tsx
|
|
|
|
import * as fs from 'node:fs/promises';
|
|
import * as path from 'node:path';
|
|
import fg from 'fast-glob';
|
|
|
|
const DOCS_DIR = path.resolve(__dirname, '..');
|
|
const CONTENT_DIR = path.join(DOCS_DIR, 'content/docs');
|
|
|
|
const bannedPatterns: Array<[RegExp, string]> = [
|
|
[/\bSTOLE FOCUS\b/, 'internal modality recorder verdict'],
|
|
[/\bax-bg\b|\bpx-bg\b|\bpx-fg\b|\bax-fg\b/, 'internal modality recorder lane'],
|
|
[/\bderec\.sh\b/, 'internal test harness script'],
|
|
[/\baz exec\b/, 'internal CI/container access detail'],
|
|
[/\bTEST_SUITE\.md\b|\bFINDINGS\.md\b/, 'repo-side contributor document reference'],
|
|
[/\bNousResearch\b|#47065\b|#22865\b/, 'private partner or issue reference'],
|
|
[/\bdocumented by a separate agent\b/i, 'authoring note'],
|
|
[/\bDo not imply\b/i, 'authoring instruction'],
|
|
[/\bdiorama\b/i, 'misnamed docs framework'],
|
|
];
|
|
|
|
async function main() {
|
|
const files = await fg('**/*.mdx', { cwd: CONTENT_DIR });
|
|
const failures: string[] = [];
|
|
|
|
for (const file of files) {
|
|
const abs = path.join(CONTENT_DIR, file);
|
|
const content = await fs.readFile(abs, 'utf8');
|
|
const lines = content.split(/\r?\n/);
|
|
|
|
for (const [lineIndex, line] of lines.entries()) {
|
|
for (const [pattern, reason] of bannedPatterns) {
|
|
if (pattern.test(line)) {
|
|
failures.push(`${file}:${lineIndex + 1}: ${reason}: ${line.trim()}`);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if (failures.length > 0) {
|
|
console.error('Public docs hygiene check failed:\n');
|
|
console.error(failures.join('\n'));
|
|
process.exit(1);
|
|
}
|
|
|
|
console.log('Public docs hygiene check passed.');
|
|
}
|
|
|
|
main().catch((error) => {
|
|
console.error('Fatal error:', error);
|
|
process.exit(1);
|
|
});
|