refactor(go/iace): split hazard_library and store into focused files under 500 LOC
All oversized iace files now comply with the 500-line hard cap: - hazard_library_ai_sw.go split into ai_sw (false_classification..communication) and ai_fw (unauthorized_access..update_failure) - hazard_library_software_hmi.go split into software_hmi (software_fault+hmi) and config_integration (configuration_error+logging+integration) - hazard_library_machine_safety.go split to keep mechanical/electrical/thermal/emc, safety_functions extracted into hazard_library_safety_functions.go - store_hazards.go split: hazard library queries moved to store_hazard_library.go - store_projects.go split: component and classification ops to store_components.go - store_mitigations.go split: evidence/verification/ref-data to store_evidence.go - hazard_library.go GetBuiltinHazardLibrary() updated to call all sub-functions - All iace tests pass (go test ./internal/iace/...) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -33,8 +33,11 @@ func mustMarshalJSON(v interface{}) json.RawMessage {
|
||||
func GetBuiltinHazardLibrary() []HazardLibraryEntry {
|
||||
var all []HazardLibraryEntry
|
||||
all = append(all, builtinHazardsAISW()...)
|
||||
all = append(all, builtinHazardsAIFW()...)
|
||||
all = append(all, builtinHazardsSoftwareHMI()...)
|
||||
all = append(all, builtinHazardsConfigIntegration()...)
|
||||
all = append(all, builtinHazardsMachineSafety()...)
|
||||
all = append(all, builtinHazardsSafetyFunctions()...)
|
||||
all = append(all, builtinHazardsISO12100Mechanical()...)
|
||||
all = append(all, builtinHazardsISO12100ElectricalThermal()...)
|
||||
all = append(all, builtinHazardsISO12100Pneumatic()...)
|
||||
|
||||
Reference in New Issue
Block a user