Repository navigation
[projmgr] Improve layer pattern validation in schema - #2712
Conversation
Test Results 2 files - 43 14 suites - 153 16m 31s ⏱️ - 3m 57s Results for commit 4c94e7d. ± Comparison against base commit 84b2269. This pull request removes 1279 and adds 1 tests. Note that renamed tests count towards both. |
There was a problem hiding this comment.
🟡 Changes recommended
The schema now rejects Windows-style relative layer paths that previously reached the parser’s portability warning; it needs to recognize backslash separators and include a regression test.
1 open issue
What changed in this PR
This PR tightens project-manager schema validation for layer references, helping catch malformed paths earlier rather than producing misleading downstream errors.
Changes:
- Restricts nonempty layer values to
.clayer.yml/.clayer.yamlpaths or$...$variables. - Clarifies that empty layer values remain allowed.
- Adds validation cases for extensions, symbols, variables, and empty values.
| File | Description |
|---|---|
| tools/projmgr/test/src/ProjMgrSchemaCheckerUnitTests.cpp | Adds valid and invalid layer-pattern test cases. |
| tools/projmgr/schemas/common.schema.json | Adds the layer validation pattern and updates its description. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2712 +/- ##
=======================================
Coverage 87.57% 87.57%
=======================================
Files 208 208
Lines 33748 33748
=======================================
Hits 29554 29554
Misses 4194 4194
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
## Fixes - Complementary to #2712 ## Changes - Clarify that project and layer paths refer to `.cproject.yml` and `.clayer.yml` files in the schema descriptions. ## Checklist - [x] 🤖 This change is covered by unit tests (if applicable). - [x] 🤹 Manual testing has been performed (if necessary). - [x] 🛡️ Security impacts have been considered (if relevant). - [x] 📖 Documentation updates are complete (if required). - [x] 🧠 Third-party dependencies and TPIP updated (if required).

Fixes
Changes
layerfield to.clayer.[yml|yaml]paths or$...$variables.Checklist