[hermes] soteria: go:S3776 #90
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
SonarQube reports go:S3776 in
internal/server/metrics.go. The build is green; this is a standing finding, not a failure.What is wrong
RecordInventory exceeds the allowed Cognitive Complexity because its nested PVC loop contains several conditional branches. Converting the Healthy boolean through a small helper removes one branch from the method without changing the emitted metric values.
Ariadne opened no pull request for it: no automated patch was possible for this finding.
Facts
internal/server/metrics.go:133)Suggested fix (not applied)
Hermes could not open a pull request for this, so the change below was not written, validated, or pushed anywhere. It is a starting point for whoever picks this up, not a reviewed patch.
internal/server/metrics.go— Replace the if/else that maps pvc.Healthy to 1 or 0 with a helper call. This preserves the exact metric behavior while reducing RecordInventory's Cognitive Complexity below the configured limit.Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_4fba471be1c842d99c3d5ed0f84c203a). Hermes has no write access to this repository; no files or infrastructure were changed.