Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add annotation positions to schema error messages #552

Merged
merged 5 commits into from
Dec 2, 2021

Conversation

gcheadle-vmware
Copy link
Contributor

  • only implemented on syntax errors when creating schema

@gcheadle-vmware gcheadle-vmware force-pushed the schema-annotation-postions branch from f04a5a2 to cf97145 Compare November 24, 2021 01:07
pkg/filepos/position.go Show resolved Hide resolved
Comment on lines +150 to +151
annPositions []*filepos.Position
position *filepos.Position
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to merge these into a single slice of Positions? I dug in a bit and it looked feasible.

If we could, it would simplify a bunch of code.

pkg/template/evaluation_ctx.go Outdated Show resolved Hide resolved
pkg/cmd/template/schema_author_test.go Show resolved Hide resolved
@gcheadle-vmware
Copy link
Contributor Author

Still wanting to follow up on the error output case for multiple file names within a slice of positions.
Also need to clean up import sorting.

Copy link
Contributor

@pivotaljohn pivotaljohn left a comment

Choose a reason for hiding this comment

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

With these suggestions, take on what you agree with...

otherwise LGTM. 👍🏻

pkg/schema/error.go Outdated Show resolved Hide resolved
pkg/schema/error.go Outdated Show resolved Hide resolved
pkg/template/evaluation_ctx.go Outdated Show resolved Hide resolved
pkg/template/instructions.go Outdated Show resolved Hide resolved
@gcheadle-vmware gcheadle-vmware merged commit 3d2c71d into develop Dec 2, 2021
@gcheadle-vmware gcheadle-vmware deleted the schema-annotation-postions branch December 2, 2021 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants