Skip to content

Add keys and endkeys for map keys - #115

Merged
leocavalcante merged 2 commits into
mainfrom
feat/keys-endkeys
Sep 29, 2026
Merged

leocavalcante merged 2 commits into
mainfrom
feat/keys-endkeys

Conversation

@leocavalcante

Copy link
Copy Markdown
Member

Fixes #48

Plain dive still checks map values. keys must follow dive on a map, and endkeys closes that key block.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

It rejects multidimensional keys nesting explicitly required by issue #48.

Review effort: Balanced
Findings: 1 High severity

Open (1)
What changed in this PR

Adds map-key validation via dive,keys,...,endkeys, including analyzer, generator, documentation, and tests.

Changes:

  • Registers and parses keys/endkeys.
  • Generates validation for scalar map keys and values.
  • Adds unit and end-to-end coverage.
File Description
README.md Documents map-key validation.
docs/​internals.md Describes internal key handling.
internal/​analyzer/​analyzer.go Analyzes key/value validation blocks.
internal/​analyzer/​dive_test.go Tests key-block analysis.
internal/​analyzer/​operations/​operations_list.go Registers the new operations.
internal/​analyzer/​operations/​operations_test.go Tests operation metadata.
internal/​analyzer/​parser_validation_test.go Tests tag parsing.
internal/​codegenerator/​build_validator.go Generates key/value loops.
internal/​codegenerator/​dive_test.go Tests generated map-key validation.
internal/​common/​dive.go Extracts scalar map-key types.
internal/​common/​dive_test.go Tests map-key extraction.
internal/​parser/​dive_test.go Tests map-key type parsing.
tests/​endtoend/​dive.go Adds end-to-end key scenarios.
tests/​endtoend/​validator__.go Updates generated validator fixture.
Files not reviewed (1)
  • tests/endtoend/validator__.go: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread internal/analyzer/analyzer.go
@leocavalcante
leocavalcante merged commit f22d2d5 into main Sep 29, 2026
4 checks passed
@leocavalcante
leocavalcante deleted the feat/keys-endkeys branch September 29, 2026 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement keys and endkeys (like GoValidator)

2 participants