fix(ci): ignore translation records in Cordis config scan
The Loader verifier matched docs/cordis-primer.i18n.yaml solely because its basename contained cordis. Centralize file discovery, exclude i18n sidecars, and cover Loader YAML plus excluded trees with a regression test.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
/** Cordis Loader configuration file discovery. */
|
||||
|
||||
import { globSync } from 'node:fs'
|
||||
|
||||
/**
|
||||
* Return repository-relative Cordis Loader YAML paths under `root`.
|
||||
*
|
||||
* Translation consistency records are YAML sidecars, never Loader inputs.
|
||||
*
|
||||
* @param root Repository root to scan.
|
||||
* @returns Sorted repository-relative Loader configuration paths.
|
||||
*/
|
||||
export function cordisConfigFiles(root: string): string[] {
|
||||
return globSync(['**/*cordis*.yml', '**/*cordis*.yaml'], {
|
||||
cwd: root,
|
||||
exclude: ['.claude/**', 'node_modules/**', 'vendor/**', '**/*.i18n.yaml'],
|
||||
}).sort()
|
||||
}
|
||||
Reference in New Issue
Block a user