Count definitions whose label is/ isn't in the valid label set. */
| 38 | |
| 39 | /* Count definitions whose label is/ isn't in the valid label set. */ |
| 40 | static inline int inv_label_valid(const char *label) { |
| 41 | static const char *valid[] = { |
| 42 | "Function", "Method", "Class", "Interface", "Struct", "Enum", "EnumMember", |
| 43 | "Module", "Variable", "Constant", "Field", "Trait", "Type", "TypeAlias", |
| 44 | "Namespace", "Property", "Route", "Macro", "Union", "Protocol","Mixin", |
| 45 | "Package", "Object", "Section", "Impl", "Annotation", "Resource", NULL}; |
| 46 | if (!label) |
| 47 | return 0; |
| 48 | for (const char **v = valid; *v; v++) |
| 49 | if (strcmp(label, *v) == 0) |
| 50 | return 1; |
| 51 | return 0; |
| 52 | } |
| 53 | |
| 54 | /* INV(labels-valid): every extracted def carries a label from the known set. |
| 55 | * Returns the count of defs with an INVALID/empty label (0 = pass). */ |
no outgoing calls
no test coverage detected