MCPcopy Create free account
hub / github.com/Permify/permify / findUncoveredRelationships

Function findUncoveredRelationships

pkg/development/coverage/coverage.go:237–248  ·  view source on GitHub ↗

findUncoveredRelationships finds relationships that are not covered in the shape

(entityName string, expected, actual []string)

Source from the content-addressed store, hash-verified

235
236// findUncoveredRelationships finds relationships that are not covered in the shape
237func findUncoveredRelationships(entityName string, expected, actual []string) []string {
238 covered := extractCoveredRelationships(entityName, actual)
239 uncovered := []string{}
240
241 for _, relationship := range expected {
242 if !slices.Contains(covered, relationship) {
243 uncovered = append(uncovered, relationship)
244 }
245 }
246
247 return uncovered
248}
249
250// findUncoveredAttributes finds attributes that are not covered in the shape
251func findUncoveredAttributes(entityName string, expected, actual []string) []string {

Callers 1

calculateEntityCoverageFunction · 0.85

Calls 1

Tested by

no test coverage detected