diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml index 8f133a876..4098ad023 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/validate.yaml @@ -17,3 +17,13 @@ jobs: working-directory: ./scripts - run: bun run index.ts working-directory: ./scripts + env: + EXCLUDED_FUNCS: | + .chain + NOT_IMPLEMENTED_FUNCS: | + string::distance::hamming + string::distance::levenshtein + string::similarity::jaro + vector::distance::mahalanobis + vector::similarity::spearman + diff --git a/scripts/index.ts b/scripts/index.ts index b6b717fc8..cff821795 100644 --- a/scripts/index.ts +++ b/scripts/index.ts @@ -5,7 +5,12 @@ const repositoryName = "surrealdb/surrealdb"; const branch = "main"; const fncSourceCodeFilePath = "core/src/fnc/mod.rs"; -const fncExclusions = [".chain"]; +const fncExclusions = Bun.env.EXCLUDED_FUNCS + ? Bun.env.EXCLUDED_FUNCS.split(",") + : []; +const fncNotImplemented = Bun.env.NOT_IMPLEMENTED_FUNCS + ? Bun.env.NOT_IMPLEMENTED_FUNCS.split(",") + : []; const detectMissingFunctions = async () => { console.log("Detecting missing functions..."); @@ -85,7 +90,8 @@ const detectMissingFunctions = async () => { .replace(/\u200B/g, "") ) .get() - .filter((functionName) => !fncExclusions.includes(functionName)); + .filter((functionName) => !fncExclusions.includes(functionName)) + .filter((functionName) => !fncNotImplemented.includes(functionName)); allDocumentedFunctions.push(...functionNames); }