extractCoveredAttributes extracts covered attributes for a given entity from the shape
(entityName string, attributes []string)
| 363 | |
| 364 | // extractCoveredAttributes extracts covered attributes for a given entity from the shape |
| 365 | func extractCoveredAttributes(entityName string, attributes []string) []string { |
| 366 | covered := []string{} |
| 367 | |
| 368 | for _, attrStr := range attributes { |
| 369 | a, err := attribute.Attribute(attrStr) |
| 370 | if err != nil { |
| 371 | continue |
| 372 | } |
| 373 | |
| 374 | if a.GetEntity().GetType() != entityName { |
| 375 | continue |
| 376 | } |
| 377 | |
| 378 | formatted := formatAttribute(a.GetEntity().GetType(), a.GetAttribute()) |
| 379 | covered = append(covered, formatted) |
| 380 | } |
| 381 | |
| 382 | return covered |
| 383 | } |
| 384 | |
| 385 | // extractCoveredAssertions extracts covered assertions for a given entity from checks and filters |
| 386 | func extractCoveredAssertions(entityName string, checks []file.Check, filters []file.EntityFilter) []string { |
no test coverage detected