Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ jobs:

- name: Validate JSON manifests
run: mise run lint:manifests

- name: Validate cross-references
run: mise run lint:cross-refs
7 changes: 6 additions & 1 deletion tools/validate-cross-refs.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,14 @@ function validatePlugin(plugin) {
info(`Validating plugin: ${pluginName}`);

// Determine plugin directory path
// Source can be relative to repo root (./plugins/foo) or to plugins dir (./foo)
const source = plugin.source || `./${pluginName}`;
const normalizedSource = source.replace(/^\.\//, "").replace(/\/$/, "");
const pluginDir = path.join(PLUGINS_ROOT, normalizedSource);

// If source already includes plugins/ prefix, use as-is; otherwise prepend PLUGINS_ROOT
const pluginDir = normalizedSource.startsWith(`${PLUGINS_ROOT}/`)
? normalizedSource
: path.join(PLUGINS_ROOT, normalizedSource);

// Check 1: Plugin directory exists
if (!fs.existsSync(pluginDir)) {
Expand Down