generated from bsv-blockchain/go-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
🧾 Go Report Card Summary
The latest Go Report Card shows several areas that need cleanup and refactoring to reach 100% compliance.
📦 Summary
| Metric | Score | Description |
|---|---|---|
| gofmt | 84% | Some files not formatted with gofmt -s |
| go vet | 100% | ✅ No problems detected |
| gocyclo | 73% | Several functions exceed cyclomatic complexity threshold (>15) |
| ineffassign | 96% | A few ineffectual assignments detected |
| license | 100% | ✅ LICENSE file detected |
| misspell | 100% | ✅ No spelling issues found |
🧹 gofmt (84%)
Run
gofmt -s -w .to simplify and reformat the affected files.
Affected Files
examples/ship/main.gopkg/advertiser/wallet_advertiser_test.gopkg/slap/lookup_service_test.gopkg/ship/lookup_service_test.go
⚙️ gocyclo (73%)
Consider refactoring these functions to reduce branching and simplify logic.
Threshold: complexity > 15
| File | Line | Function | Complexity |
|---|---|---|---|
pkg/utils/validation.go |
117 | validateJS8CallURI() |
21 |
pkg/ship/lookup_service.go |
209 | (*LookupService).validateQuery() |
18 |
pkg/slap/lookup_service.go |
209 | (*LookupService).validateQuery() |
17 |
pkg/ship/storage_test.go |
69 | (*TestSHIPStorage).FindRecord() |
17 |
pkg/slap/topic_manager.go |
365 | (*TopicManager).IdentifyAdmissibleOutputs() |
22 |
pkg/ship/topic_manager.go |
291 | (*TopicManager).IdentifyAdmissibleOutputs() |
22 |
pkg/advertiser/wallet_advertiser.go |
220 | (*WalletAdvertiser).CreateAdvertisements() |
21 |
⚠️ ineffassign (96%)
Remove or handle ineffectual assignments to avoid dead code.
File: pkg/advertiser/wallet_advertiser.go
- Line 260: ineffectual assignment to
err - Line 1177: ineffectual assignment to
offset
✅ No Issues Found
- go vet: No suspicious constructs
- license: LICENSE file present
- misspell: No misspellings detected
🧩 Next Steps
-
Run format check:
gofmt -s -w . -
Run linters locally before committing:
golangci-lint run ./...
-
Refactor high-complexity functions (see above list).
-
Fix ineffassign warnings.
Goal:
📈 Bring Go Report Card score to 100% compliance across all metrics.
Metadata
Metadata
Assignees
Labels
No labels