kibi-core 0.3.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/schema/entities.pl +1 -0
- package/src/checks.pl +9 -9
package/package.json
CHANGED
package/schema/entities.pl
CHANGED
|
@@ -28,6 +28,7 @@ entity_property(_, priority, atom).
|
|
|
28
28
|
entity_property(_, severity, atom).
|
|
29
29
|
entity_property(_, links, list).
|
|
30
30
|
entity_property(_, text_ref, uri).
|
|
31
|
+
entity_property(_, sourceFile, uri).
|
|
31
32
|
|
|
32
33
|
% Typed fact fields - only valid for fact entities
|
|
33
34
|
entity_property(fact, fact_kind, atom).
|
package/src/checks.pl
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
check_all_json/1, % Returns all violations as JSON string
|
|
9
9
|
check_must_priority_coverage/1, % Returns list of must-priority violations
|
|
10
10
|
check_symbol_coverage/1, % Returns list of uncovered symbols
|
|
11
|
-
check_symbol_traceability/2, % Returns list of symbols lacking
|
|
11
|
+
check_symbol_traceability/2, % Returns list of symbols lacking requirement traceability (ReqAdr option)
|
|
12
12
|
check_no_dangling_refs/1, % Returns list of dangling ref violations
|
|
13
13
|
check_no_cycles/1, % Returns list of cycle violations
|
|
14
14
|
check_required_fields/1, % Returns list of missing required field violations
|
|
@@ -106,8 +106,8 @@ symbol_coverage_violation(SymbolId, violation(
|
|
|
106
106
|
violation_source(SymbolId, symbol, Source).
|
|
107
107
|
|
|
108
108
|
%% check_symbol_traceability(+RequireAdr, -Violations)
|
|
109
|
-
% Finds all symbols lacking
|
|
110
|
-
% - Every symbol must have at least one
|
|
109
|
+
% Finds all symbols lacking supported requirement traceability:
|
|
110
|
+
% - Every symbol must have at least one supported requirement traceability path
|
|
111
111
|
% - If RequireAdr=true, the symbol must also have at least one 'constrained_by' relationship to an ADR
|
|
112
112
|
check_symbol_traceability(RequireAdr, Violations) :-
|
|
113
113
|
findall(
|
|
@@ -125,8 +125,8 @@ symbol_traceability_violation(RequireAdr, violation(
|
|
|
125
125
|
Source
|
|
126
126
|
)) :-
|
|
127
127
|
kb_entity(SymbolId, symbol, _),
|
|
128
|
-
% Check if symbol has
|
|
129
|
-
(
|
|
128
|
+
% Check if symbol has a supported requirement traceability path
|
|
129
|
+
( transitively_implements(SymbolId, ReqId),
|
|
130
130
|
kb_entity(ReqId, req, _)
|
|
131
131
|
-> HasReq = true
|
|
132
132
|
; HasReq = false
|
|
@@ -142,11 +142,11 @@ symbol_traceability_violation(RequireAdr, violation(
|
|
|
142
142
|
),
|
|
143
143
|
% Determine what is missing
|
|
144
144
|
( HasReq = false, HasAdr = false, RequireAdr = true ->
|
|
145
|
-
Description = "Symbol has no
|
|
146
|
-
Suggestion = "Add 'implements: REQ-xxx' and 'constrained_by: ADR-xxx' in symbols.yaml."
|
|
145
|
+
Description = "Symbol has no supported requirement traceability path and no ADR constraint.",
|
|
146
|
+
Suggestion = "Add a direct 'implements: REQ-xxx' link or a test-backed 'covered_by' + 'validates'/'verified_by' path, and add 'constrained_by: ADR-xxx' in symbols.yaml."
|
|
147
147
|
; HasReq = false ->
|
|
148
|
-
Description = "Symbol has no
|
|
149
|
-
Suggestion = "Add 'implements: REQ-xxx'
|
|
148
|
+
Description = "Symbol has no supported requirement traceability path.",
|
|
149
|
+
Suggestion = "Add a direct 'implements: REQ-xxx' link or a test-backed 'covered_by' + 'validates'/'verified_by' path."
|
|
150
150
|
; HasAdr = false ->
|
|
151
151
|
Description = "Symbol has no ADR constraint.",
|
|
152
152
|
Suggestion = "Add 'constrained_by: ADR-xxx' in symbols.yaml."
|