Skip to content

Commit 34b4e4f

Browse files
committed
feat: exclude unwanted function names
1 parent 5ce4d1d commit 34b4e4f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

scripts/index.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ const repositoryName = "surrealdb/surrealdb";
55
const branch = "main";
66
const fncSourceCodeFilePath = "core/src/fnc/mod.rs";
77

8+
const fncExclusions = [".chain"];
9+
810
const detectMissingFunctions = async () => {
911
console.log("Detecting missing functions...");
1012
console.log("--------------------------------------------------");
@@ -68,6 +70,10 @@ const detectMissingFunctions = async () => {
6870
"../doc-surrealql_versioned_docs/version-latest/functions/database/*.mdx"
6971
);
7072
for await (const path of glob.scan(".")) {
73+
if (path.endsWith("index.mdx")) {
74+
continue;
75+
}
76+
7177
const data = await Bun.file(path).text();
7278
const $ = cheerio.load(data);
7379

@@ -78,7 +84,8 @@ const detectMissingFunctions = async () => {
7884
.replace("()", "")
7985
.replace(/\u200B/g, "")
8086
)
81-
.get();
87+
.get()
88+
.filter((functionName) => !fncExclusions.includes(functionName));
8289

8390
allDocumentedFunctions.push(...functionNames);
8491
}

0 commit comments

Comments
 (0)