MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / checkFileWithLang

Function checkFileWithLang

packages/common/cases.ts:11–14  ·  view source on GitHub ↗
(s: CompilableSource, errMsg: string)

Source from the content-addressed store, hash-verified

9 user_extra_files: [],
10 };
11 const checkFileWithLang = (s: CompilableSource, errMsg: string) => {
12 if (typeof s === 'string') return { lang: 'auto', file: checkFile(s, errMsg) };
13 return { lang: s.lang, file: checkFile(s.file, errMsg) };
14 };
15 if (cfg.type === 'objective') {
16 if (cfg.checker || cfg.interactor || cfg.validator) {
17 throw new Error('You cannot use checker, interactor or validator for objective questions');

Callers 1

readYamlCasesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected