Merged
Conversation
Codecov Report❌ Patch coverage is ❌ Your project status has failed because the head coverage (73.50%) is below the target coverage (75.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
miparnisari
commented
Mar 18, 2026
|
|
||
| // ParameterTypeString returns the string form of the type reference. | ||
| func ParameterTypeString(typeRef *core.CaveatTypeReference) string { | ||
| if typeRef == nil { |
Contributor
Author
There was a problem hiding this comment.
FYI this test in the position mapper makes it crash:
{
+ name: "caveat parameter reference second reference",
+ schema: `definition user {}
+
+ caveat somecaveat(someparam int) {
+ someparam < 42 || someparam > 43
+ }
+
+ definition resource {
+ relation viewer: user with somecaveat
+ permission view = viewer
+ }
+ `,
+ line: 3,
+ column: 23,
+ expectedReference: &SchemaReference{
+ Source: input.Source("test"),
+ Position: input.Position{LineNumber: 3, ColumnPosition: 23},
+ Text: "someparam",
+ ReferenceType: ReferenceTypeCaveatParameter,
+ ReferenceMarkdown: "someparam int",
+ TargetSource: &testSource,
+ TargetSourceCode: "someparam int",
+ TargetNamePositionOffset: 0,
+ },
+ },
fe72a10 to
3900670
Compare
miparnisari
commented
Mar 18, 2026
| hasBlankline: true, | ||
| hasNewScope: true, | ||
| caveatTypeSet: caveatTypeSet, | ||
| } |
Contributor
Author
There was a problem hiding this comment.
FYI notice how the flags map isn't set
3900670 to
090e4f5
Compare
090e4f5 to
f9b79dd
Compare
barakmich
approved these changes
Mar 18, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Extracting some changes from #2965