MCPcopy Create free account
hub / github.com/promptfoo/promptfoo / loadConfigOrDefault

Function loadConfigOrDefault

src/codeScan/config/loader.ts:80–86  ·  view source on GitHub ↗
(configPath?: string)

Source from the content-addressed store, hash-verified

78 * Returns a clone to prevent mutation of the singleton default
79 */
80export function loadConfigOrDefault(configPath?: string): Config {
81 if (!configPath) {
82 return { ...DEFAULT_CONFIG }; // Return clone to prevent singleton mutation
83 }
84
85 return loadConfig(configPath);
86}
87
88/**
89 * Options that can be passed to merge with config

Callers 2

loader.test.tsFile · 0.90
executeScanFunction · 0.90

Calls 1

loadConfigFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…