MCPcopy Create free account
hub / github.com/openai/plugins / countDecisionPoints

Function countDecisionPoints

plugins/plugin-eval/src/evaluators/python.js:8–18  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

6}
7
8function countDecisionPoints(text) {
9 return (
10 countMatches(text, /\bif\b/g) +
11 countMatches(text, /\belif\b/g) +
12 countMatches(text, /\bfor\b/g) +
13 countMatches(text, /\bwhile\b/g) +
14 countMatches(text, /\bexcept\b/g) +
15 countMatches(text, /\band\b/g) +
16 countMatches(text, /\bor\b/g)
17 );
18}
19
20function detectFunctions(lines) {
21 const functions = [];

Callers 2

detectFunctionsFunction · 0.70
analyzePythonFilesFunction · 0.70

Calls 1

countMatchesFunction · 0.70

Tested by

no test coverage detected