feat(lint): add structural, schema, and reference-location validation#67
Merged
ghaskins merged 1 commit intomanetu:mainfrom Apr 9, 2026
Merged
feat(lint): add structural, schema, and reference-location validation#67ghaskins merged 1 commit intomanetu:mainfrom
ghaskins merged 1 commit intomanetu:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
14756dd to
71171dc
Compare
- Gap 1: validate Resource.Group → resource-group references (previously unvalidated). Adds ResourceEntity interface and validateResources to the validation layer; wires ResourceAdapter into the registry. - Gap 2: enrich Phase 2 reference diagnostics with YAML line/column by walking the raw node tree post-conversion (references.go). Covers all entity types: role, group, resource-group, scope, operation, resource, policy, and library. - Gaps 3+4: add Phase 1.75 structural validation (structure.go) that detects missing metadata.name, empty/absent mrn fields, duplicate MRNs within a section, missing rego on policies/libraries/mappers, and missing selector on operations/mappers/resources. Two new source constants: SourceDuplicate and SourceSchema. Signed-off-by: Greg Haskins <greg@manetu.com>
71171dc to
ae2c400
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gap 1: validate Resource.Group → resource-group references (previously unvalidated). Adds ResourceEntity interface and validateResources to the validation layer; wires ResourceAdapter into the registry.
Gap 2: enrich Phase 2 reference diagnostics with YAML line/column by walking the raw node tree post-conversion (references.go). Covers all entity types: role, group, resource-group, scope, operation, resource, policy, and library.
Gaps 3+4: add Phase 1.75 structural validation (structure.go) that detects missing metadata.name, empty/absent mrn fields, duplicate MRNs within a section, missing rego on policies/libraries/mappers, and missing selector on operations/mappers/resources. Two new source constants: SourceDuplicate and SourceSchema.