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

Function findUncoveredAttributes

pkg/development/coverage/coverage.go:251–262  ·  view source on GitHub ↗

findUncoveredAttributes finds attributes that are not covered in the shape

(entityName string, expected, actual []string)

Source from the content-addressed store, hash-verified

249
250// findUncoveredAttributes finds attributes that are not covered in the shape
251func findUncoveredAttributes(entityName string, expected, actual []string) []string {
252 covered := extractCoveredAttributes(entityName, actual)
253 uncovered := []string{}
254
255 for _, attr := range expected {
256 if !slices.Contains(covered, attr) {
257 uncovered = append(uncovered, attr)
258 }
259 }
260
261 return uncovered
262}
263
264// findUncoveredAssertions finds assertions that are not covered in the shape
265func findUncoveredAssertions(entityName string, expected []string, checks []file.Check, filters []file.EntityFilter) []string {

Callers 1

calculateEntityCoverageFunction · 0.85

Calls 1

extractCoveredAttributesFunction · 0.85

Tested by

no test coverage detected