← Back to issue list

parts: add part validator

View original Github issue

Metadata

Project
craft-parts
Number
#277
Type
pull request
State
merged
Author
cmatsuoka
Labels
Created
Updated
Closed

Current evaluation

Merged adds a centralized part validation helper that validates data against part and plugin models, replacing per-tool logic. Approved, passed CI, and resolves issue #176.

Suggested action:

No scores available.

Issue body

Add a part validation helper that validates part data against the part and plugin models. Currently all craft tools validate part data, so do it in the library instead of implementing a validator in each application. Fixes #176. Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com> - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? -----

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged adds a centralized part validation helper that validates data against part and plugin models, replacing per-tool logic. Approved, passed CI, and resolves issue #176.
qwen3.6-35b-a3b-mtp-q6 Merged addition of a centralized part validation helper for part and plugin models, replacing per-tool implementations and resolving issue #176.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#70 parts: use part validator from craft-parts rockcraft merged Merged after approval and rebase. Replaced the local part validator with the shared implementation from craft-parts to validate part data against part and plugin models, removing the deprecated local code.
84%
#3909 parts: use part validator from craft-parts snapcraft merged Merged into main. Replaced the local part validator with the shared craft-parts implementation, removing 119 lines across six files. Approved by reviewers, passed CI, and increased test coverage by 0.80%.
80%
#569 fix(parts): validate part dependency name craft-parts merged Merged code that validates part dependency names, raising an error for non-existent references. Approved by two reviewers, passed CI, and resolves issue #539.
72%
#1036 parts: better error message when defining parts snapcraft merged Merged improved error messaging for part definitions. Approved by one reviewer, passed CI, and changed two files (+7/-3 lines). Addresses LP #1604827.
72%
#40 parts: unmarshal plugin properties craft-parts merged Merged following two reviewer approvals and passing CI. The change implements validation and unmarshaling logic for plugin properties, assigning them to their corresponding parts across six modified files.
72%
#558 fix(parts): validate part dependency name craft-parts merged Merged fix for #539 that validates part dependency names. The change raises an error when a part references a non-existent dependency, approved by two reviewers and passing CI checks.
72%
#3636 parts: integrate craft-parts (CRAFT-765) snapcraft merged Merged after reviewer approval and passing CI checks. Integrates craft-parts for part validation and lifecycle processing. Modifies 12 files, adding 369 lines and removing 20, fulfilling CRAFT-765.
72%
#224 plugin: plugin validation with only one part dep craft-parts merged Merged after reviewer approval and passing CI. Updated plugin validation for single-part dependencies and fixed node verification to skip checks when nodes are included. The provisional solution was accepted for integration.
71%
#93 lifecycle: add part validator (CRAFT-367) craft-parts closed Superseded without merging. The validator was simplified and moved to the application layer instead of being added to craft-parts.
71%
#125 main: add details to the parts specification error message (CRAFT-512) craft-parts merged Merged enhancement to craft-parts CLI that adds specific validation failure details to invalid parts specification errors. Approved by two reviewers and passed CI checks.
71%