feat: add portals.yml schema validator#886
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR adds a new CLI validator ChangesPortals Configuration Validator
Sequence Diagram(s)sequenceDiagram
participant CLI
participant FileSystem
participant ProviderLoader
participant Validator
participant Console
CLI->>FileSystem: read portals.yml (--file)
CLI->>ProviderLoader: load providers/*.mjs
ProviderLoader->>Validator: provide providerIds set
FileSystem->>Validator: provide parsed YAML config
Validator->>Console: print warnings/errors (path: message)
CLI->>Console: exit with code (0 success / 1 on errors)
Estimated code review effort 🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…s/test entries; register validate-portals.mjs in SYSTEM_PATHS and BOOTSTRAP_PATHS
|
Merged — cryptic scanner failures from malformed portals.yml are a whole class of support issues, and this turns them into precise line-level errors. Registered it in SYSTEM_PATHS/BOOTSTRAP_PATHS while resolving the conflicts (the checklist that bit four releases). Six PRs resolved for you today — four in, with the criterion for the other five explained on #890. Quality week, @luochen211. 🚀 |
Summary
validate-portals.mjsto validateportals.ymlshape before scanner runs.npm run validate:portals, docs, and regression coverage intest-all.mjs.Fixes #877
Tests
npm run validate:portals -- --file templates/portals.example.ymlnode validate-portals.mjs --self-testnode --check validate-portals.mjs && node --check test-all.mjsnode test-all.mjs— 173 passed, 0 failed, 7 existing README.ua personal-data warningsSummary by CodeRabbit
New Features
Tests
Documentation