[hermes] soteria: go:S3776 #9
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 cognitive-complexity threshold by one point because it branches solely to translate pvc.Healthy into a metric value. Replace that branch with a small boolean-to-gauge helper without changing emitted metrics.
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— The Healthy if/else writes the same metric with only the numeric value changed. Moving that boolean conversion to a helper removes one decision from RecordInventory while preserving the exact 1 for healthy and 0 for unhealthy behavior.Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_8782f654008a48fbb30aea71acd65d87). Hermes has no write access to this repository; no files or infrastructure were changed.