[hermes] pegasus: go:S3776 #1
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
backend/uploads.go. The build is green; this is a standing finding, not a failure.What is wrong
moveFromTus combines source-file discovery, directory preparation, dry-run handling, and rename/copy fallback, which pushes its Cognitive Complexity just over Sonar's threshold. Extracting the source-file lookup preserves all existing lookup order and error handling while reducing the method's complexity.
Ariadne opened no pull request for it: no automated patch was possible for this finding.
Facts
backend/uploads.go:21)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.
backend/uploads.go— Move the candidate-path and directory-scan logic into a helper. This keeps the same candidate order, regular-file check, prefix fallback, and ignored ReadDir error, while making moveFromTus responsible only for moving a source that was found.Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_db1850794c444570b183b994f6ccff3f). Hermes has no write access to this repository; no files or infrastructure were changed.