[hermes] ananke: go:S1192 #226
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:S1192 in
internal/cluster/orchestrator_longhorn_reconcile.go. The build is green; this is a standing finding, not a failure.What is wrong
The literal "longhorn-system" is hard-coded three times (in queryLonghornNodes, queryLonghornManagerDaemonSet, and longhornManagerPodsByNode) instead of being defined once as a named constant, which is what go:S1192 flags.
Ariadne opened no pull request for it: no automated patch was possible for this finding.
Facts
internal/cluster/orchestrator_longhorn_reconcile.go:136)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/cluster/orchestrator_longhorn_reconcile.go— Add a package-level constant longhornNamespace = "longhorn-system" near the type declarations and reference it at all three kubectl call sites instead of repeating the string literal. This removes the duplication the rule flags without changing any behavior.Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_37c3e613f93b41e5ae4628ecafc2764d). Hermes has no write access to this repository; no files or infrastructure were changed.